Change the CFG_STDLIB_DEFAULT macro into a call that picks the correct stage
stageN/rustc depends on either stageN/libstd.so or stage(N-1)/lib/libstd.rlib so CFG_STDLIB_DEFAULT needs to try harder to get the dependencies right.
This commit is contained in:
parent
e891e0b992
commit
6fc33163dc
|
@ -50,9 +50,9 @@ CFG_STDLIB :=$(call CFG_LIB_NAME,std)
|
|||
CFG_LIBRUSTC :=$(call CFG_LIB_NAME,rustc)
|
||||
|
||||
ifdef CFG_DISABLE_SHAREDSTD
|
||||
CFG_STDLIB_DEFAULT := lib/libstd.rlib
|
||||
CFG_STDLIB_DEFAULT = $(1)/lib/libstd.rlib
|
||||
else
|
||||
CFG_STDLIB_DEFAULT := $(CFG_STDLIB)
|
||||
CFG_STDLIB_DEFAULT = $(2)/$(CFG_STDLIB)
|
||||
endif
|
||||
|
||||
# version-string calculation
|
||||
|
@ -165,7 +165,7 @@ define SREQ
|
|||
ifdef CFG_DISABLE_SHAREDSTD
|
||||
SREQ$(1) = stage$(1)/rustc$(X) \
|
||||
stage$(1)/$$(CFG_RUNTIME) \
|
||||
stage$(1)/$$(CFG_STDLIB_DEFAULT) \
|
||||
$$(call CFG_STDLIB_DEFAULT,stage$(1),stage$(1)) \
|
||||
stage$(1)/$$(CFG_RUSTLLVM) \
|
||||
stage$(1)/lib/glue.o \
|
||||
stage$(1)/lib/main.o \
|
||||
|
@ -174,7 +174,7 @@ SREQ$(1) = stage$(1)/rustc$(X) \
|
|||
else
|
||||
SREQ$(1) = stage$(1)/rustc$(X) \
|
||||
stage$(1)/$$(CFG_RUNTIME) \
|
||||
stage$(1)/$$(CFG_STDLIB_DEFAULT) \
|
||||
$$(call CFG_STDLIB_DEFAULT,stage$(1),stage$(1)) \
|
||||
stage$(1)/$$(CFG_RUSTLLVM) \
|
||||
stage$(1)/lib/glue.o \
|
||||
stage$(1)/lib/main.o \
|
||||
|
|
|
@ -52,7 +52,7 @@ stage$(2)/%.o: stage$(2)/%.s
|
|||
|
||||
stage$(2)/rustc$$(X): $$(COMPILER_CRATE) $$(COMPILER_INPUTS) \
|
||||
stage$(2)/$$(CFG_RUNTIME) \
|
||||
stage$(1)/$$(CFG_STDLIB_DEFAULT) \
|
||||
$$(call CFG_STDLIB_DEFAULT,stage$(1),stage$(2)) \
|
||||
stage$(2)/$$(CFG_RUSTLLVM) \
|
||||
$$(SREQ$(1))
|
||||
@$$(call E, compile_and_link: $$@)
|
||||
|
|
Loading…
Reference in New Issue