2011-10-01 22:12:08 -05:00
|
|
|
# Extract the snapshot host compiler
|
|
|
|
|
2013-10-21 04:18:21 -05:00
|
|
|
$(HBIN0_H_$(CFG_BUILD))/:
|
2013-07-04 09:51:45 -05:00
|
|
|
mkdir -p $@
|
2012-04-05 17:40:34 -05:00
|
|
|
|
2014-09-24 19:46:36 -05:00
|
|
|
# On windows these two are the same, so cause a redifinition warning
|
|
|
|
ifneq ($(HBIN0_H_$(CFG_BUILD)),$(HLIB0_H_$(CFG_BUILD)))
|
2013-10-21 04:18:21 -05:00
|
|
|
$(HLIB0_H_$(CFG_BUILD))/:
|
2013-07-04 09:51:45 -05:00
|
|
|
mkdir -p $@
|
2014-09-24 19:46:36 -05:00
|
|
|
endif
|
2012-04-05 17:40:34 -05:00
|
|
|
|
2014-07-22 23:37:05 -05:00
|
|
|
$(SNAPSHOT_RUSTC_POST_CLEANUP): \
|
2016-04-13 13:18:35 -05:00
|
|
|
$(S)src/stage0.txt \
|
|
|
|
$(S)src/etc/get-stage0.py $(MKFILE_DEPS) \
|
2013-10-21 04:18:21 -05:00
|
|
|
| $(HBIN0_H_$(CFG_BUILD))/
|
2011-05-03 13:34:44 -05:00
|
|
|
@$(call E, fetch: $@)
|
2012-04-05 17:40:34 -05:00
|
|
|
ifdef CFG_ENABLE_LOCAL_RUST
|
2014-03-25 20:18:57 -05:00
|
|
|
$(Q)$(S)src/etc/local_stage0.sh $(CFG_BUILD) $(CFG_LOCAL_RUST_ROOT) rustlib
|
2013-05-03 18:25:04 -05:00
|
|
|
else
|
2016-04-13 13:18:35 -05:00
|
|
|
$(Q)$(CFG_PYTHON) $(S)src/etc/get-stage0.py $(CFG_BUILD)
|
2013-05-03 18:25:04 -05:00
|
|
|
endif
|
2014-11-18 13:53:39 -06:00
|
|
|
$(Q)if [ -e "$@" ]; then touch "$@"; else echo "ERROR: snapshot $@ not found"; exit 1; fi
|
2011-05-01 15:18:52 -05:00
|
|
|
|
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
|
|
|
|
|
2013-07-04 09:51:45 -05:00
|
|
|
$(HBIN0_H_$(1))/:
|
|
|
|
mkdir -p $@
|
|
|
|
|
|
|
|
$(HLIB0_H_$(1))/:
|
|
|
|
mkdir -p $@
|
|
|
|
|
|
|
|
$$(HBIN0_H_$(1))/rustc$$(X_$(1)): \
|
|
|
|
$$(TBIN$(2)_T_$(1)_H_$(3))/rustc$$(X_$(1)) \
|
|
|
|
| $(HBIN0_H_$(1))/
|
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.
|
2014-07-22 23:37:05 -05:00
|
|
|
$(foreach t,$(NON_BUILD_HOST), \
|
2013-10-21 04:18:21 -05:00
|
|
|
$(eval $(call BOOTSTRAP_STAGE0,$(t),1,$(CFG_BUILD))))
|