Put std in stageN/lib. This avoids windows trying to load stageN/std.ll when

stageN/runstc.exe is run.
This commit is contained in:
Rafael Ávila de Espíndola 2011-06-17 15:32:41 -04:00
parent e43a3755dd
commit 342dbd7abe
8 changed files with 27 additions and 24 deletions

View File

@ -149,8 +149,8 @@ COMPILER_INPUTS := $(wildcard $(addprefix $(S)src/comp/, \
LREQ := rt/$(CFG_RUNTIME) rustllvm/$(CFG_RUSTLLVM)
SREQ0 := stage0/rustc$(X) $(LREQ) rt/main.o stage0/glue.o stage0/$(CFG_STDLIB)
SREQ1 := stage1/rustc$(X) $(LREQ) rt/main.o stage1/glue.o stage1/$(CFG_STDLIB)
SREQ2 := stage2/rustc$(X) $(LREQ) rt/main.o stage2/glue.o stage2/$(CFG_STDLIB)
SREQ1 := stage1/rustc$(X) $(LREQ) rt/main.o stage1/glue.o stage1/lib/$(CFG_STDLIB)
SREQ2 := stage2/rustc$(X) $(LREQ) rt/main.o stage2/glue.o stage2/lib/$(CFG_STDLIB)
######################################################################
@ -187,7 +187,7 @@ all: rt/$(CFG_RUNTIME) \
stage0/rustc$(X) \
$(GENERATED) \
$(DOCS) \
stage1/$(CFG_STDLIB) \
stage1/lib/$(CFG_STDLIB) \
stage1/intrinsics.bc \
stage1/glue.o \
stage1/rustc$(X) \
@ -201,15 +201,15 @@ all: rt/$(CFG_RUNTIME) \
stage0/rustc$(X) \
$(GENERATED) \
$(DOCS) \
stage1/$(CFG_STDLIB) \
stage1/lib/$(CFG_STDLIB) \
stage1/intrinsics.bc \
stage1/glue.o \
stage1/rustc$(X) \
stage2/$(CFG_STDLIB) \
stage2/lib/$(CFG_STDLIB) \
stage2/intrinsics.bc \
stage2/glue.o \
stage2/rustc$(X) \
stage3/$(CFG_STDLIB) \
stage3/lib/$(CFG_STDLIB) \
stage3/glue.o \
stage3/intrinsics.bc \
stage3/rustc$(X)

View File

@ -23,9 +23,9 @@ clean:
$(Q)rm -f $(CRATE_DEPFILES:%.d=%.d.tmp)
$(Q)rm -f $(GENERATED)
$(Q)rm -f stage0/rustc$(X) stage0/$(CFG_STDLIB)
$(Q)rm -f stage1/rustc$(X) stage1/$(CFG_STDLIB) stage1/glue*
$(Q)rm -f stage2/rustc$(X) stage2/$(CFG_STDLIB) stage2/glue*
$(Q)rm -f stage3/rustc$(X) stage3/$(CFG_STDLIB) stage3/glue*
$(Q)rm -f stage1/rustc$(X) stage1/lib/$(CFG_STDLIB) stage1/glue*
$(Q)rm -f stage2/rustc$(X) stage2/lib/$(CFG_STDLIB) stage2/glue*
$(Q)rm -f stage3/rustc$(X) stage3/lib/$(CFG_STDLIB) stage3/glue*
$(Q)rm -f rustllvm/$(CFG_RUSTLLVM) rustllvm/rustllvmbits.a
$(Q)rm -f rt/$(CFG_RUNTIME)
$(Q)rm -f rt/main.o

View File

@ -82,7 +82,7 @@ ifdef CFG_WINDOWSY
CFG_LDPATH :=$(CFG_LDPATH):$(CFG_LLVM_BINDIR)
CFG_LDPATH :=$(CFG_LDPATH):$$PATH
CFG_RUN_TEST=PATH="$(CFG_LDPATH):$(call CFG_TESTLIB,$(1))" $(1)
CFG_RUN_TARG=PATH="$(CFG_BUILD_DIR)/$(1):$(CFG_LDPATH)" $(2)
CFG_RUN_TARG=PATH="$(CFG_BUILD_DIR)/$(1):$(CFG_BUILD_DIR)/$(1)/lib:$(CFG_LDPATH)" $(2)
CFG_PATH_MUNGE := $(strip perl -i.bak -p \
-e 's@\\(\S)@/\1@go;' \
@ -98,7 +98,7 @@ ifdef CFG_UNIXY
CFG_PATH_MUNGE := true
CFG_EXE_SUFFIX :=
CFG_LDPATH :=$(CFG_LDPATH):$(CFG_LLVM_LIBDIR)
CFG_RUN_TARG=$(CFG_LDENV)=$(CFG_BUILD_DIR)/$(1):$(CFG_LDPATH) $(2)
CFG_RUN_TARG=$(CFG_LDENV)=$(CFG_BUILD_DIR)/$(1):$(CFG_BUILD_DIR)/$(1)/lib:$(CFG_LDPATH) $(2)
CFG_RUN_TEST=\
$(CFG_LDENV)=$(call CFG_TESTLIB,$(1)):$(CFG_LDPATH) \
$(CFG_VALGRIND) $(1)
@ -108,7 +108,7 @@ ifdef CFG_UNIXY
CFG_LIB_NAME=$(1).dll
CFG_LDPATH :=$(CFG_LDPATH):$(CFG_LLVM_BINDIR)
CFG_LDPATH :=$(CFG_LDPATH):$$PATH
CFG_RUN_TARG=PATH=$(CFG_BUILD_DIR)/$(1):$(CFG_LDPATH) $(2)
CFG_RUN_TARG=PATH=$(CFG_BUILD_DIR)/$(1):$(CFG_BUILD_DIR)/$(1)/lib:$(CFG_LDPATH) $(2)
CFG_RUN_TEST=PATH=$(CFG_LDPATH):$(call CFG_TESTLIB,$(1)) $(1)
CFG_INFO := $(info cfg: mingw-cross)

View File

@ -1,10 +1,10 @@
snap-stage1: stage1/rustc$(X) stage1/glue.o stage1/$(CFG_STDLIB)
snap-stage1: stage1/rustc$(X) stage1/glue.o stage1/lib/$(CFG_STDLIB)
$(CFG_SRC_DIR)src/etc/make-snapshot.py stage1
snap-stage2: stage2/rustc$(X) stage2/glue.o stage2/$(CFG_STDLIB)
snap-stage2: stage2/rustc$(X) stage2/glue.o stage2/lib/$(CFG_STDLIB)
$(CFG_SRC_DIR)src/etc/make-snapshot.py stage2
snap-stage3: stage3/rustc$(X) stage3/glue.o stage3/$(CFG_STDLIB)
snap-stage3: stage3/rustc$(X) stage3/glue.o stage3/lib/$(CFG_STDLIB)
$(CFG_SRC_DIR)src/etc/make-snapshot.py stage3

View File

@ -1,7 +1,8 @@
stage1/$(CFG_STDLIB): $(STDLIB_CRATE) $(STDLIB_INPUTS) \
stage1/lib/$(CFG_STDLIB): $(STDLIB_CRATE) $(STDLIB_INPUTS) \
stage1/rustc$(X) stage0/$(CFG_STDLIB) stage1/intrinsics.bc \
stage1/glue.o $(LREQ) $(MKFILES)
@$(call E, compile_and_link: $@)
mkdir -p stage1/lib
$(STAGE1) --shared -o $@ $<
stage1/glue.o: stage1/rustc$(X) stage0/$(CFG_STDLIB) stage1/intrinsics.bc \

View File

@ -1,10 +1,11 @@
stage2/$(CFG_STDLIB): $(STDLIB_CRATE) $(STDLIB_INPUTS) \
stage2/rustc$(X) stage1/$(CFG_STDLIB) stage2/intrinsics.bc \
stage2/lib/$(CFG_STDLIB): $(STDLIB_CRATE) $(STDLIB_INPUTS) \
stage2/rustc$(X) stage1/lib/$(CFG_STDLIB) stage2/intrinsics.bc \
stage2/glue.o $(LREQ) $(MKFILES)
@$(call E, compile_and_link: $@)
mkdir -p stage2/lib
$(STAGE2) --shared -o $@ $<
stage2/glue.o: stage2/rustc$(X) stage1/$(CFG_STDLIB) stage2/intrinsics.bc \
stage2/glue.o: stage2/rustc$(X) stage1/lib/$(CFG_STDLIB) stage2/intrinsics.bc \
rustllvm/$(CFG_RUSTLLVM) rt/$(CFG_RUNTIME)
@$(call E, generate: $@)
$(STAGE2) -c -o $@ --glue

View File

@ -1,10 +1,11 @@
stage3/$(CFG_STDLIB): $(STDLIB_CRATE) $(STDLIB_INPUTS) \
stage3/rustc$(X) stage2/$(CFG_STDLIB) stage3/intrinsics.bc \
stage3/lib/$(CFG_STDLIB): $(STDLIB_CRATE) $(STDLIB_INPUTS) \
stage3/rustc$(X) stage2/lib/$(CFG_STDLIB) stage3/intrinsics.bc \
stage3/glue.o $(LREQ) $(MKFILES)
@$(call E, compile_and_link: $@)
mkdir -p stage3/lib
$(STAGE3) --shared -o $@ $<
stage3/glue.o: stage3/rustc$(X) stage2/$(CFG_STDLIB) stage3/intrinsics.bc \
stage3/glue.o: stage3/rustc$(X) stage2/lib/$(CFG_STDLIB) stage3/intrinsics.bc \
rustllvm/$(CFG_RUSTLLVM) rt/$(CFG_RUNTIME)
@$(call E, generate: $@)
$(STAGE3) -c -o $@ --glue

View File

@ -205,7 +205,7 @@ fn build_target_config() -> @session::config {
fn build_session_options(str binary, getopts::match match, str binary_dir) ->
@session::options {
auto shared = opt_present(match, "shared");
auto library_search_paths = [binary_dir];
auto library_search_paths = [binary_dir + "/lib"];
library_search_paths += getopts::opt_strs(match, "L");
auto output_type =
if (opt_present(match, "parse-only")) {
@ -395,7 +395,7 @@ fn main(vec[str] args) {
if (sopts.output_type == link::output_type_exe) {
let str glu = binary_dir + "/glue.o";
let str main = "rt/main.o";
let str stage = "-L" + binary_dir;
let str stage = "-L" + binary_dir + "/lib";
let vec[str] gcc_args;
let str prog = "gcc";
// The invocations of gcc share some flags across platforms