1 # Extract the snapshot host compiler
3 $(HBIN0_H_$(CFG_BUILD))/:
6 # On windows these two are the same, so cause a redifinition warning
7 ifneq ($(HBIN0_H_$(CFG_BUILD)),$(HLIB0_H_$(CFG_BUILD)))
8 $(HLIB0_H_$(CFG_BUILD))/:
12 $(SNAPSHOT_RUSTC_POST_CLEANUP): \
14 $(S)src/etc/get-stage0.py $(MKFILE_DEPS) \
15 | $(HBIN0_H_$(CFG_BUILD))/
17 ifdef CFG_ENABLE_LOCAL_RUST
18 $(Q)$(S)src/etc/local_stage0.sh $(CFG_BUILD) $(CFG_LOCAL_RUST_ROOT) rustlib
20 $(Q)$(CFG_PYTHON) $(S)src/etc/get-stage0.py $(CFG_BUILD)
22 $(Q)if [ -e "$@" ]; then touch "$@"; else echo "ERROR: snapshot $@ not found"; exit 1; fi
24 # For other targets, let the host build the target:
26 define BOOTSTRAP_STAGE0
27 # $(1) target to bootstrap
28 # $(2) stage to bootstrap from
29 # $(3) target to bootstrap from
37 $$(HBIN0_H_$(1))/rustc$$(X_$(1)): \
38 $$(TBIN$(2)_T_$(1)_H_$(3))/rustc$$(X_$(1)) \
45 # Use stage1 to build other architectures: then you don't have to wait
46 # for stage2, but you get the latest updates to the compiler source.
47 $(foreach t,$(NON_BUILD_HOST), \
48 $(eval $(call BOOTSTRAP_STAGE0,$(t),1,$(CFG_BUILD))))