mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-21 22:34:05 +00:00
Add support for building with a static libstd for testing static crate support.
This commit is contained in:
parent
7a919da04e
commit
88894b6f9c
19
Makefile.in
19
Makefile.in
@ -49,6 +49,12 @@ CFG_RUSTLLVM :=$(call CFG_LIB_NAME,rustllvm)
|
||||
CFG_STDLIB :=$(call CFG_LIB_NAME,std)
|
||||
CFG_LIBRUSTC :=$(call CFG_LIB_NAME,rustc)
|
||||
|
||||
ifdef CFG_DISABLE_SHAREDSTD
|
||||
CFG_STDLIB_DEFAULT := lib/libstd.rlib
|
||||
else
|
||||
CFG_STDLIB_DEFAULT := $(CFG_STDLIB)
|
||||
endif
|
||||
|
||||
# version-string calculation
|
||||
CFG_GIT_DIR := $(CFG_SRC_DIR).git
|
||||
CFG_VERSION = prerelease
|
||||
@ -156,15 +162,26 @@ LLC := $(CFG_LLVM_BINDIR)/llc$(X)
|
||||
######################################################################
|
||||
|
||||
define SREQ
|
||||
ifdef CFG_DISABLE_SHAREDSTD
|
||||
SREQ$(1) = stage$(1)/rustc$(X) \
|
||||
stage$(1)/$$(CFG_RUNTIME) \
|
||||
stage$(1)/$$(CFG_STDLIB) \
|
||||
stage$(1)/$$(CFG_STDLIB_DEFAULT) \
|
||||
stage$(1)/$$(CFG_RUSTLLVM) \
|
||||
stage$(1)/lib/glue.o \
|
||||
stage$(1)/lib/main.o \
|
||||
stage$(1)/lib/$$(CFG_RUNTIME) \
|
||||
$$(MKFILES)
|
||||
else
|
||||
SREQ$(1) = stage$(1)/rustc$(X) \
|
||||
stage$(1)/$$(CFG_RUNTIME) \
|
||||
stage$(1)/$$(CFG_STDLIB_DEFAULT) \
|
||||
stage$(1)/$$(CFG_RUSTLLVM) \
|
||||
stage$(1)/lib/glue.o \
|
||||
stage$(1)/lib/main.o \
|
||||
stage$(1)/lib/$$(CFG_RUNTIME) \
|
||||
stage$(1)/lib/$$(CFG_STDLIB) \
|
||||
$$(MKFILES)
|
||||
endif
|
||||
|
||||
STAGE$(1) := $$(Q)$$(call CFG_RUN_TARG,stage$(1),stage$(1), \
|
||||
$$(CFG_VALGRIND_COMPILE) stage$(1)/rustc$$(X) \
|
||||
|
1
configure
vendored
1
configure
vendored
@ -162,6 +162,7 @@ else
|
||||
step_msg "processing $CFG_SELF args"
|
||||
fi
|
||||
|
||||
opt sharedstd 1 "build libstd as a shared library"
|
||||
opt valgrind 1 "run tests with valgrind"
|
||||
opt docs 1 "build documentation"
|
||||
opt optimize 1 "build optimized rust code"
|
||||
|
@ -33,3 +33,6 @@ stage0/lib/$(CFG_RUNTIME): stage0/rustc$(X)
|
||||
|
||||
stage0/lib/$(CFG_STDLIB): stage0/rustc$(X)
|
||||
$(Q)touch $@
|
||||
|
||||
stage0/lib/libstd.rlib: stage0/rustc$(X)
|
||||
$(Q)touch $@
|
||||
|
@ -23,7 +23,7 @@ stage$(2)/%.o: stage$(2)/%.s
|
||||
|
||||
stage$(2)/rustc$$(X): $$(COMPILER_CRATE) $$(COMPILER_INPUTS) \
|
||||
stage$(2)/$$(CFG_RUNTIME) \
|
||||
stage$(2)/$$(CFG_STDLIB) \
|
||||
stage$(1)/$$(CFG_STDLIB_DEFAULT) \
|
||||
stage$(2)/$$(CFG_RUSTLLVM) \
|
||||
$$(SREQ$(1))
|
||||
@$$(call E, compile_and_link: $$@)
|
||||
|
Loading…
Reference in New Issue
Block a user