2011-11-21 22:11:40 +01:00
|
|
|
# CP_HOST_STAGE_N template: arg 1 is the N we're promoting *from*, arg
|
|
|
|
# 2 is N+1. Must be invoked to promote target artifacts to host
|
|
|
|
# artifacts for stage 1-3 (stage0 host artifacts come from the
|
|
|
|
# snapshot). Arg 3 is the triple we're copying FROM and arg 4 is the
|
|
|
|
# triple we're copying TO.
|
2011-10-02 05:12:08 +02:00
|
|
|
#
|
|
|
|
# The easiest way to read this template is to assume we're promoting
|
|
|
|
# stage1 to stage2 and mentally gloss $(1) as 1, $(2) as 2.
|
|
|
|
|
2011-11-21 22:11:40 +01:00
|
|
|
define CP_HOST_STAGE_N
|
2011-10-02 05:12:08 +02:00
|
|
|
|
|
|
|
# Host libraries and executables (stage$(2)/bin/rustc and its runtime needs)
|
|
|
|
|
2011-11-21 22:11:40 +01:00
|
|
|
$$(HBIN$(2)_H_$(4))/rustc$$(X): \
|
|
|
|
$$(TBIN$(1)_T_$(4)_H_$(3))/rustc$$(X) \
|
|
|
|
$$(HLIB$(2)_H_$(4))/$$(CFG_RUNTIME) \
|
|
|
|
$$(HLIB$(2)_H_$(4))/$$(CFG_RUSTLLVM) \
|
2012-01-26 15:43:39 +01:00
|
|
|
$$(HLIB$(2)_H_$(4))/$$(CFG_LIBRUSTC) \
|
2011-12-06 01:46:37 +01:00
|
|
|
$$(HCORELIB_DEFAULT$(2)_H_$(4)) \
|
2011-11-21 22:11:40 +01:00
|
|
|
$$(HSTDLIB_DEFAULT$(2)_H_$(4))
|
2011-10-02 05:12:08 +02:00
|
|
|
@$$(call E, cp: $$@)
|
|
|
|
$$(Q)cp $$< $$@
|
|
|
|
|
|
|
|
# FIXME: The fuzzer depends on this. Remove once it's rpathed to correctly
|
|
|
|
# find it in the appropriate target directory
|
2011-11-21 22:11:40 +01:00
|
|
|
$$(HLIB$(2)_H_$(4))/$$(CFG_LIBRUSTC): \
|
|
|
|
$$(TLIB$(1)_T_$(4)_H_$(3))/$$(CFG_LIBRUSTC) \
|
|
|
|
$$(HLIB$(2)_H_$(4))/$$(CFG_RUNTIME) \
|
|
|
|
$$(HLIB$(2)_H_$(4))/$$(CFG_RUSTLLVM) \
|
2011-12-06 01:46:37 +01:00
|
|
|
$$(HCORELIB_DEFAULT$(2)_H_$(3)) \
|
2011-11-21 22:11:40 +01:00
|
|
|
$$(HSTDLIB_DEFAULT$(2)_H_$(3))
|
2011-10-02 05:12:08 +02:00
|
|
|
@$$(call E, cp: $$@)
|
|
|
|
$$(Q)cp $$< $$@
|
2011-12-02 17:51:59 +01:00
|
|
|
$$(Q)cp $$(TLIB$(1)_T_$(4)_H_$(3))/$(LIBRUSTC_GLOB) \
|
|
|
|
$$(HLIB$(2)_H_$(4))
|
2011-10-02 05:12:08 +02:00
|
|
|
|
2011-11-21 22:11:40 +01:00
|
|
|
$$(HLIB$(2)_H_$(4))/$$(CFG_RUNTIME): \
|
|
|
|
$$(TLIB$(1)_T_$(4)_H_$(3))/$$(CFG_RUNTIME)
|
2011-10-02 05:12:08 +02:00
|
|
|
@$$(call E, cp: $$@)
|
|
|
|
$$(Q)cp $$< $$@
|
|
|
|
|
2011-12-06 01:46:37 +01:00
|
|
|
$$(HLIB$(2)_H_$(4))/$$(CFG_CORELIB): \
|
|
|
|
$$(TLIB$(1)_T_$(4)_H_$(3))/$$(CFG_CORELIB) \
|
|
|
|
$$(HLIB$(2)_H_$(4))/$$(CFG_RUNTIME)
|
|
|
|
@$$(call E, cp: $$@)
|
|
|
|
$$(Q)cp $$< $$@
|
2011-12-02 17:51:59 +01:00
|
|
|
$$(Q)cp $$(TLIB$(1)_T_$(4)_H_$(3))/$(CORELIB_GLOB) \
|
|
|
|
$$(HLIB$(2)_H_$(4))
|
2011-12-06 01:46:37 +01:00
|
|
|
|
2011-11-21 22:11:40 +01:00
|
|
|
$$(HLIB$(2)_H_$(4))/$$(CFG_STDLIB): \
|
|
|
|
$$(TLIB$(1)_T_$(4)_H_$(3))/$$(CFG_STDLIB) \
|
2011-12-06 01:46:37 +01:00
|
|
|
$$(HLIB$(2)_H_$(4))/$$(CFG_CORELIB) \
|
|
|
|
$$(HLIB$(2)_H_$(4))/$$(CFG_RUNTIME)
|
|
|
|
@$$(call E, cp: $$@)
|
|
|
|
$$(Q)cp $$< $$@
|
2011-12-02 17:51:59 +01:00
|
|
|
$$(Q)cp $$(TLIB$(1)_T_$(4)_H_$(3))/$(STDLIB_GLOB) \
|
|
|
|
$$(HLIB$(2)_H_$(4))
|
2011-12-06 01:46:37 +01:00
|
|
|
|
|
|
|
$$(HLIB$(2)_H_$(4))/libcore.rlib: \
|
|
|
|
$$(TLIB$(1)_T_$(4)_H_$(3))/libcore.rlib \
|
2011-11-21 22:11:40 +01:00
|
|
|
$$(HLIB$(2)_H_$(4))/$$(CFG_RUNTIME)
|
2011-10-02 05:12:08 +02:00
|
|
|
@$$(call E, cp: $$@)
|
|
|
|
$$(Q)cp $$< $$@
|
|
|
|
|
2011-11-21 22:11:40 +01:00
|
|
|
$$(HLIB$(2)_H_$(4))/libstd.rlib: \
|
|
|
|
$$(TLIB$(1)_T_$(4)_H_$(3))/libstd.rlib \
|
2011-12-06 01:46:37 +01:00
|
|
|
$$(HLIB$(2)_H_$(4))/libcore.rlib \
|
2011-11-21 22:11:40 +01:00
|
|
|
$$(HLIB$(2)_H_$(4))/$$(CFG_RUNTIME)
|
2011-10-02 05:12:08 +02:00
|
|
|
@$$(call E, cp: $$@)
|
|
|
|
$$(Q)cp $$< $$@
|
|
|
|
|
2011-12-17 02:21:18 +01:00
|
|
|
$$(HLIB$(2)_H_$(4))/librustc.rlib: \
|
|
|
|
$$(TLIB$(1)_T_$(4)_H_$(3))/librustc.rlib \
|
|
|
|
$$(HLIB$(2)_H_$(4))/libcore.rlib \
|
|
|
|
$$(HLIB$(2)_H_$(4))/libstd.rlib \
|
|
|
|
$$(HLIB$(2)_H_$(4))/$$(CFG_RUNTIME)
|
|
|
|
@$$(call E, cp: $$@)
|
|
|
|
$$(Q)cp $$< $$@
|
|
|
|
|
2011-11-21 22:11:40 +01:00
|
|
|
$$(HLIB$(2)_H_$(4))/$$(CFG_RUSTLLVM): \
|
|
|
|
$$(TLIB$(1)_T_$(4)_H_$(3))/$$(CFG_RUSTLLVM)
|
2011-10-02 05:12:08 +02:00
|
|
|
@$$(call E, cp: $$@)
|
|
|
|
$$(Q)cp $$< $$@
|
|
|
|
|
|
|
|
endef
|
|
|
|
|
2011-11-21 22:11:40 +01:00
|
|
|
$(foreach t,$(CFG_TARGET_TRIPLES), \
|
|
|
|
$(eval $(call CP_HOST_STAGE_N,0,1,$(t),$(t))) \
|
|
|
|
$(eval $(call CP_HOST_STAGE_N,1,2,$(t),$(t))) \
|
|
|
|
$(eval $(call CP_HOST_STAGE_N,2,3,$(t),$(t))))
|