mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-31 14:31:55 +00:00
makefiles now seem to be working, rustc is not
This commit is contained in:
parent
791dc23c83
commit
8371beb590
@ -59,11 +59,14 @@ GEN_MKFILES := $(wildcard $(CFG_SRC_DIR)/mk/libuv/*/*/*) \
|
||||
|
||||
MKFILES := $(OUR_MKFILES) $(3RDPARTY_MKFILES) $(GEN_MKFILES)
|
||||
|
||||
NON_HOST_TRIPLES = $(filter-out $(CFG_HOST_TRIPLE),$(CFG_TARGET_TRIPLES))
|
||||
|
||||
ifneq ($(MAKE_RESTARTS),)
|
||||
CFG_INFO := $(info cfg: make restarts: $(MAKE_RESTARTS))
|
||||
endif
|
||||
|
||||
CFG_INFO := $(info cfg: shell host triple $(CFG_HOST_TRIPLE))
|
||||
CFG_INFO := $(info cfg: non host triples $(NON_HOST_TRIPLES))
|
||||
|
||||
ifdef CFG_DISABLE_OPTIMIZE
|
||||
$(info cfg: disabling rustc optimization (CFG_DISABLE_OPTIMIZE))
|
||||
@ -220,7 +223,6 @@ endef
|
||||
$(foreach target,$(CFG_TARGET_TRIPLES), \
|
||||
$(eval $(call DEF_LLVM_VARS,$(target))))
|
||||
|
||||
|
||||
######################################################################
|
||||
# Exports for sub-utilities
|
||||
######################################################################
|
||||
|
32
mk/stage0.mk
32
mk/stage0.mk
@ -20,3 +20,35 @@ $(HLIB0_H_$(CFG_HOST_TRIPLE))/$(CFG_STDLIB): \
|
||||
$(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))))
|
||||
|
11
mk/target.mk
11
mk/target.mk
@ -56,9 +56,10 @@ $$(TLIB$(1)_T_$(2)_H_$(3))/$$(CFG_LIBRUSTC): \
|
||||
|
||||
endef
|
||||
|
||||
# Instantiate template for all stages
|
||||
# In principle, each host can build each target:
|
||||
$(foreach source,$(CFG_TARGET_TRIPLES), \
|
||||
$(foreach target,$(CFG_TARGET_TRIPLES), \
|
||||
$(eval $(call TARGET_STAGE_N,0,$(target),$(CFG_HOST_TRIPLE))) \
|
||||
$(eval $(call TARGET_STAGE_N,1,$(target),$(CFG_HOST_TRIPLE))) \
|
||||
$(eval $(call TARGET_STAGE_N,2,$(target),$(CFG_HOST_TRIPLE))) \
|
||||
$(eval $(call TARGET_STAGE_N,3,$(target),$(CFG_HOST_TRIPLE))))
|
||||
$(eval $(call TARGET_STAGE_N,0,$(source),$(target))) \
|
||||
$(eval $(call TARGET_STAGE_N,1,$(source),$(target))) \
|
||||
$(eval $(call TARGET_STAGE_N,2,$(source),$(target))) \
|
||||
$(eval $(call TARGET_STAGE_N,3,$(source),$(target)))))
|
||||
|
Loading…
Reference in New Issue
Block a user