2011-10-01 22:12:08 -05:00
|
|
|
# Extract the snapshot host compiler
|
|
|
|
|
2011-11-21 15:11:40 -06:00
|
|
|
$(HBIN0_H_$(CFG_HOST_TRIPLE))/rustc$(X): \
|
|
|
|
$(S)src/snapshots.txt \
|
2011-11-23 17:20:28 -06:00
|
|
|
$(S)src/etc/get-snapshot.py $(MKFILE_DEPS)
|
2011-05-03 13:34:44 -05:00
|
|
|
@$(call E, fetch: $@)
|
2011-11-21 15:11:40 -06:00
|
|
|
$(Q)$(S)src/etc/get-snapshot.py $(CFG_HOST_TRIPLE)
|
2011-05-03 17:51:21 -05:00
|
|
|
$(Q)touch $@
|
2011-05-01 15:18:52 -05:00
|
|
|
|
2011-10-01 22:12:08 -05:00
|
|
|
# Host libs will be extracted by the above rule
|
2011-05-03 13:34:44 -05:00
|
|
|
|
2011-11-21 15:11:40 -06:00
|
|
|
$(HLIB0_H_$(CFG_HOST_TRIPLE))/$(CFG_RUNTIME): \
|
|
|
|
$(HBIN0_H_$(CFG_HOST_TRIPLE))/rustc$(X)
|
2011-07-21 18:11:35 -05:00
|
|
|
$(Q)touch $@
|
2011-05-04 20:28:30 -05:00
|
|
|
|
2011-12-08 10:01:48 -06:00
|
|
|
## FIXME temporary hack for snapshot transition
|
|
|
|
CORELIB_DUMMY :=$(call CFG_LIB_NAME,core-dummy)
|
|
|
|
STDLIB_DUMMY :=$(call CFG_LIB_NAME,std-dummy)
|
|
|
|
|
2011-12-05 18:46:37 -06:00
|
|
|
$(HLIB0_H_$(CFG_HOST_TRIPLE))/$(CFG_CORELIB): \
|
|
|
|
$(HBIN0_H_$(CFG_HOST_TRIPLE))/rustc$(X)
|
|
|
|
$(Q)touch $@
|
2011-12-08 10:01:48 -06:00
|
|
|
$(foreach target,$(CFG_TARGET_TRIPLES),\
|
|
|
|
$(shell touch $(CFG_HOST_TRIPLE)/stage0/lib/rustc/$(target)/lib/$(CORELIB_DUMMY)))
|
2011-12-05 18:46:37 -06:00
|
|
|
|
2011-11-21 15:11:40 -06:00
|
|
|
$(HLIB0_H_$(CFG_HOST_TRIPLE))/$(CFG_STDLIB): \
|
|
|
|
$(HBIN0_H_$(CFG_HOST_TRIPLE))/rustc$(X)
|
2011-07-20 18:32:53 -05:00
|
|
|
$(Q)touch $@
|
2011-12-08 10:01:48 -06:00
|
|
|
$(foreach target,$(CFG_TARGET_TRIPLES),\
|
|
|
|
$(shell touch $(CFG_HOST_TRIPLE)/stage0/lib/rustc/$(target)/lib/$(STDLIB_DUMMY)))
|
2011-07-11 15:31:47 -05:00
|
|
|
|
2011-11-21 15:11:40 -06:00
|
|
|
$(HLIB0_H_$(CFG_HOST_TRIPLE))/$(CFG_RUSTLLVM): \
|
|
|
|
$(HBIN0_H_$(CFG_HOST_TRIPLE))/rustc$(X)
|
2011-07-11 15:31:47 -05:00
|
|
|
$(Q)touch $@
|
2011-11-22 15:04:52 -06:00
|
|
|
|
|
|
|
# For other targets, let the host build the target:
|
|
|
|
|
|
|
|
define BOOTSTRAP_STAGE0
|
|
|
|
# $(1) target to bootstrap
|
|
|
|
# $(2) stage to bootstrap from
|
|
|
|
# $(3) target to bootstrap from
|
|
|
|
|
|
|
|
$$(HBIN0_H_$(1))/rustc$$(X): \
|
|
|
|
$$(TBIN$(2)_T_$(1)_H_$(3))/rustc$$(X)
|
|
|
|
@$$(call E, cp: $$@)
|
|
|
|
$$(Q)cp $$< $$@
|
|
|
|
|
|
|
|
$$(HLIB0_H_$(1))/$$(CFG_RUNTIME): \
|
2011-11-29 17:03:03 -06:00
|
|
|
$$(TLIB$(2)_T_$(1)_H_$(3))/$$(CFG_RUNTIME)
|
2011-11-22 15:04:52 -06:00
|
|
|
@$$(call E, cp: $$@)
|
|
|
|
$$(Q)cp $$< $$@
|
|
|
|
|
2011-12-05 18:46:37 -06:00
|
|
|
$$(HLIB0_H_$(1))/$(CFG_CORELIB): \
|
|
|
|
$$(TLIB$(2)_T_$(1)_H_$(3))/$$(CFG_CORELIB)
|
|
|
|
@$$(call E, cp: $$@)
|
2011-12-08 10:01:48 -06:00
|
|
|
$$(Q)cp $$(TLIB$(2)_T_$(1)_H_$(3))/$$(CORELIB_GLOB) $$@
|
2011-12-05 18:46:37 -06:00
|
|
|
|
2011-11-22 15:04:52 -06:00
|
|
|
$$(HLIB0_H_$(1))/$(CFG_STDLIB): \
|
2011-11-29 17:03:03 -06:00
|
|
|
$$(TLIB$(2)_T_$(1)_H_$(3))/$$(CFG_STDLIB)
|
2011-11-22 15:04:52 -06:00
|
|
|
@$$(call E, cp: $$@)
|
2011-12-08 10:01:48 -06:00
|
|
|
$$(Q)cp $$(TLIB$(2)_T_$(1)_H_$(3))/$$(STDLIB_GLOB) $$@
|
2011-11-22 15:04:52 -06:00
|
|
|
|
|
|
|
$$(HLIB0_H_$(1))/$(CFG_RUSTLLVM): \
|
2011-11-29 17:03:03 -06:00
|
|
|
$$(TLIB$(2)_T_$(1)_H_$(3))/$$(CFG_RUSTLLVM)
|
2011-11-22 15:04:52 -06:00
|
|
|
@$$(call E, cp: $$@)
|
|
|
|
$$(Q)cp $$< $$@
|
|
|
|
|
|
|
|
endef
|
|
|
|
|
2011-11-23 17:20:28 -06:00
|
|
|
# Use stage1 to build other architectures: then you don't have to wait
|
|
|
|
# for stage2, but you get the latest updates to the compiler source.
|
2011-11-22 15:04:52 -06:00
|
|
|
$(foreach t,$(NON_HOST_TRIPLES), \
|
2011-11-23 17:20:28 -06:00
|
|
|
$(eval $(call BOOTSTRAP_STAGE0,$(t),1,$(CFG_HOST_TRIPLE))))
|