2011-10-02 05:12:08 +02:00
|
|
|
# Extract the snapshot host compiler
|
|
|
|
|
2013-10-21 11:18:21 +02:00
|
|
|
$(HBIN0_H_$(CFG_BUILD))/:
|
2013-07-04 16:51:45 +02:00
|
|
|
mkdir -p $@
|
2012-04-06 00:40:34 +02:00
|
|
|
|
2013-10-21 11:18:21 +02:00
|
|
|
$(HLIB0_H_$(CFG_BUILD))/:
|
2013-07-04 16:51:45 +02:00
|
|
|
mkdir -p $@
|
2012-04-06 00:40:34 +02:00
|
|
|
|
2013-09-01 00:53:56 +02:00
|
|
|
$(SNAPSHOT_RUSTC_POST_CLEANUP): \
|
2011-11-21 22:11:40 +01:00
|
|
|
$(S)src/snapshots.txt \
|
2013-07-04 16:51:45 +02:00
|
|
|
$(S)src/etc/get-snapshot.py $(MKFILE_DEPS) \
|
2013-10-21 11:18:21 +02:00
|
|
|
| $(HBIN0_H_$(CFG_BUILD))/
|
2013-07-04 16:51:45 +02:00
|
|
|
|
2011-05-03 20:34:44 +02:00
|
|
|
@$(call E, fetch: $@)
|
2012-02-10 02:58:09 +01:00
|
|
|
# Note: the variable "SNAPSHOT_FILE" is generally not set, and so
|
2013-05-04 01:25:04 +02:00
|
|
|
# we generally only pass one argument to this script.
|
2012-04-06 00:40:34 +02:00
|
|
|
ifdef CFG_ENABLE_LOCAL_RUST
|
2013-10-21 11:18:21 +02:00
|
|
|
$(Q)$(S)src/etc/local_stage0.sh $(CFG_BUILD) $(CFG_LOCAL_RUST_ROOT)
|
2013-05-04 01:25:04 +02:00
|
|
|
else
|
2013-10-21 11:18:21 +02:00
|
|
|
$(Q)$(CFG_PYTHON) $(S)src/etc/get-snapshot.py $(CFG_BUILD) $(SNAPSHOT_FILE)
|
2012-10-05 00:08:34 +02:00
|
|
|
ifdef CFG_ENABLE_PAX_FLAGS
|
|
|
|
@$(call E, apply PaX flags: $@)
|
2012-10-04 03:46:32 +02:00
|
|
|
@"$(CFG_PAXCTL)" -cm "$@"
|
|
|
|
endif
|
2013-05-04 01:25:04 +02:00
|
|
|
endif
|
2011-05-04 00:51:21 +02:00
|
|
|
$(Q)touch $@
|
2011-05-01 22:18:52 +02:00
|
|
|
|
2011-11-22 22:04:52 +01: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 16:51:45 +02: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 22:04:52 +01:00
|
|
|
@$$(call E, cp: $$@)
|
|
|
|
$$(Q)cp $$< $$@
|
|
|
|
|
|
|
|
endef
|
|
|
|
|
2011-11-24 00:20:28 +01: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.
|
2013-11-01 08:09:04 +01:00
|
|
|
$(foreach t,$(NON_BUILD_HOST), \
|
2013-10-21 11:18:21 +02:00
|
|
|
$(eval $(call BOOTSTRAP_STAGE0,$(t),1,$(CFG_BUILD))))
|