rust/mk/stage0.mk

55 lines
1.3 KiB
Makefile
Raw Normal View History

# Extract the snapshot host compiler
2011-11-21 22:11:40 +01:00
$(HBIN0_H_$(CFG_HOST_TRIPLE))/rustc$(X): \
$(S)src/snapshots.txt \
$(S)src/etc/get-snapshot.py $(MKFILES)
@$(call E, fetch: $@)
2011-11-21 22:11:40 +01:00
$(Q)$(S)src/etc/get-snapshot.py $(CFG_HOST_TRIPLE)
$(Q)touch $@
2011-05-01 22:18:52 +02:00
# Host libs will be extracted by the above rule
2011-11-21 22:11:40 +01:00
$(HLIB0_H_$(CFG_HOST_TRIPLE))/$(CFG_RUNTIME): \
$(HBIN0_H_$(CFG_HOST_TRIPLE))/rustc$(X)
$(Q)touch $@
2011-05-05 03:28:30 +02:00
2011-11-21 22:11:40 +01:00
$(HLIB0_H_$(CFG_HOST_TRIPLE))/$(CFG_STDLIB): \
$(HBIN0_H_$(CFG_HOST_TRIPLE))/rustc$(X)
$(Q)touch $@
2011-11-21 22:11:40 +01:00
$(HLIB0_H_$(CFG_HOST_TRIPLE))/$(CFG_RUSTLLVM): \
$(HBIN0_H_$(CFG_HOST_TRIPLE))/rustc$(X)
$(Q)touch $@
# 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): \
$$(TBIN$(2)_T_$(1)_H_$(3))/rustc$$(X)
@$$(call E, cp: $$@)
$$(Q)cp $$< $$@
$$(HLIB0_H_$(1))/$(CFG_STDLIB): \
$$(TBIN$(2)_T_$(1)_H_$(3))/rustc$$(X)
@$$(call E, cp: $$@)
$$(Q)cp $$< $$@
$$(HLIB0_H_$(1))/$(CFG_RUSTLLVM): \
$$(TBIN$(2)_T_$(1)_H_$(3))/rustc$$(X)
@$$(call E, cp: $$@)
$$(Q)cp $$< $$@
endef
$(foreach t,$(NON_HOST_TRIPLES), \
$(eval $(call BOOTSTRAP_STAGE0,$(t),2,$(CFG_HOST_TRIPLE))))