]> git.lizzy.rs Git - rust.git/blobdiff - mk/target.mk
mk: Add the ability to depend on native LLVM tools
[rust.git] / mk / target.mk
index 97b08ebb0339c2f6397da911c32e3b7e8da79ac2..4359eec8447b2d3a6d90deccfe8349b1f7753f72 100644 (file)
@@ -37,7 +37,9 @@ CRATE_FULLDEPS_$(1)_T_$(2)_H_$(3)_$(4) := \
                $$(foreach dep,$$(NATIVE_DEPS_$(4)), \
                  $$(RT_OUTPUT_DIR_$(2))/$$(call CFG_STATIC_LIB_NAME_$(2),$$(dep))) \
                $$(foreach dep,$$(NATIVE_DEPS_$(4)_T_$(2)), \
-                 $$(RT_OUTPUT_DIR_$(2))/$$(dep))
+                 $$(RT_OUTPUT_DIR_$(2))/$$(dep)) \
+               $$(foreach dep,$$(NATIVE_TOOL_DEPS_$(4)_T_$(2)), \
+                 $$(TBIN$(1)_T_$(3)_H_$(3))/$$(dep))
 endef
 
 $(foreach host,$(CFG_HOST), \
@@ -149,6 +151,11 @@ $$(TLIB$(1)_T_$(2)_H_$(3))/%: $$(RT_OUTPUT_DIR_$(2))/% \
            | $$(TLIB$(1)_T_$(2)_H_$(3))/ $$(SNAPSHOT_RUSTC_POST_CLEANUP)
        @$$(call E, cp: $$@)
        $$(Q)cp $$< $$@
+
+$$(TBIN$(1)_T_$(2)_H_$(3))/%: $$(CFG_LLVM_INST_DIR_$(2))/bin/% \
+           | $$(TBIN$(1)_T_$(2)_H_$(3))/ $$(SNAPSHOT_RUSTC_POST_CLEANUP)
+       @$$(call E, cp: $$@)
+       $$(Q)cp $$< $$@
 endef
 
 $(foreach source,$(CFG_HOST), \