2011-10-02 05:12:08 +02:00
|
|
|
# Extract the snapshot host compiler
|
|
|
|
|
2011-11-21 22:11:40 +01:00
|
|
|
$(HBIN0_H_$(CFG_HOST_TRIPLE))/rustc$(X): \
|
|
|
|
$(S)src/snapshots.txt \
|
2011-11-24 00:20:28 +01:00
|
|
|
$(S)src/etc/get-snapshot.py $(MKFILE_DEPS)
|
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
|
|
|
|
# we generally only pass one argument to this script.
|
|
|
|
$(Q)$(S)src/etc/get-snapshot.py $(CFG_HOST_TRIPLE) $(SNAPSHOT_FILE)
|
2011-05-04 00:51:21 +02:00
|
|
|
$(Q)touch $@
|
2011-05-01 22:18:52 +02:00
|
|
|
|
2011-10-02 05:12:08 +02:00
|
|
|
# Host libs will be extracted by the above rule
|
2011-05-03 20:34:44 +02:00
|
|
|
|
2011-11-21 22:11:40 +01:00
|
|
|
$(HLIB0_H_$(CFG_HOST_TRIPLE))/$(CFG_RUNTIME): \
|
|
|
|
$(HBIN0_H_$(CFG_HOST_TRIPLE))/rustc$(X)
|
2011-07-22 01:11:35 +02:00
|
|
|
$(Q)touch $@
|
2011-05-05 03:28:30 +02:00
|
|
|
|
2011-12-06 01:46:37 +01:00
|
|
|
$(HLIB0_H_$(CFG_HOST_TRIPLE))/$(CFG_CORELIB): \
|
|
|
|
$(HBIN0_H_$(CFG_HOST_TRIPLE))/rustc$(X)
|
|
|
|
$(Q)touch $@
|
|
|
|
|
2011-11-21 22:11:40 +01:00
|
|
|
$(HLIB0_H_$(CFG_HOST_TRIPLE))/$(CFG_STDLIB): \
|
|
|
|
$(HBIN0_H_$(CFG_HOST_TRIPLE))/rustc$(X)
|
2011-07-21 01:32:53 +02:00
|
|
|
$(Q)touch $@
|
2011-07-11 22:31:47 +02:00
|
|
|
|
2011-12-17 02:21:18 +01:00
|
|
|
$(HLIB0_H_$(CFG_HOST_TRIPLE))/$(CFG_LIBRUSTC): \
|
|
|
|
$(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)
|
2011-07-11 22:31:47 +02:00
|
|
|
$(Q)touch $@
|
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
|
|
|
|
|
|
|
|
$$(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-30 00:03:03 +01:00
|
|
|
$$(TLIB$(2)_T_$(1)_H_$(3))/$$(CFG_RUNTIME)
|
2011-11-22 22:04:52 +01:00
|
|
|
@$$(call E, cp: $$@)
|
|
|
|
$$(Q)cp $$< $$@
|
|
|
|
|
2011-12-06 01:46:37 +01:00
|
|
|
$$(HLIB0_H_$(1))/$(CFG_CORELIB): \
|
|
|
|
$$(TLIB$(2)_T_$(1)_H_$(3))/$$(CFG_CORELIB)
|
|
|
|
@$$(call E, cp: $$@)
|
2011-12-08 17:01:48 +01:00
|
|
|
$$(Q)cp $$(TLIB$(2)_T_$(1)_H_$(3))/$$(CORELIB_GLOB) $$@
|
2011-12-06 01:46:37 +01:00
|
|
|
|
2011-11-22 22:04:52 +01:00
|
|
|
$$(HLIB0_H_$(1))/$(CFG_STDLIB): \
|
2011-11-30 00:03:03 +01:00
|
|
|
$$(TLIB$(2)_T_$(1)_H_$(3))/$$(CFG_STDLIB)
|
2011-11-22 22:04:52 +01:00
|
|
|
@$$(call E, cp: $$@)
|
2011-12-08 17:01:48 +01:00
|
|
|
$$(Q)cp $$(TLIB$(2)_T_$(1)_H_$(3))/$$(STDLIB_GLOB) $$@
|
2011-11-22 22:04:52 +01:00
|
|
|
|
2011-12-17 02:21:18 +01:00
|
|
|
$$(HLIB0_H_$(1))/$(CFG_LIBRUSTC): \
|
|
|
|
$$(TLIB$(2)_T_$(1)_H_$(3))/$$(CFG_LIBRUSTC)
|
|
|
|
@$$(call E, cp: $$@)
|
|
|
|
$$(Q)cp $$(TLIB$(2)_T_$(1)_H_$(3))/$$(LIBRUSTC_GLOB) $$@
|
|
|
|
|
2011-11-22 22:04:52 +01:00
|
|
|
$$(HLIB0_H_$(1))/$(CFG_RUSTLLVM): \
|
2011-11-30 00:03:03 +01:00
|
|
|
$$(TLIB$(2)_T_$(1)_H_$(3))/$$(CFG_RUSTLLVM)
|
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.
|
2011-11-22 22:04:52 +01:00
|
|
|
$(foreach t,$(NON_HOST_TRIPLES), \
|
2011-11-24 00:20:28 +01:00
|
|
|
$(eval $(call BOOTSTRAP_STAGE0,$(t),1,$(CFG_HOST_TRIPLE))))
|