Skip to content

Commit 90bb682

Browse files
committed
put librustrt and librustllvm in stageN dirs. Closes rust-lang#438.
1 parent 007a736 commit 90bb682

File tree

4 files changed

+29
-4
lines changed

4 files changed

+29
-4
lines changed

mk/platform.mk

+2-4
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,6 @@ ifneq ($(findstring MINGW,$(CFG_OSTYPE)),)
6363
CFG_WINDOWSY := 1
6464
endif
6565

66-
CFG_LDPATH :=$(CFG_BUILD_DIR)/rt
67-
CFG_LDPATH :=$(CFG_LDPATH):$(CFG_BUILD_DIR)/rustllvm
6866
CFG_TESTLIB=$(CFG_BUILD_DIR)/$(strip \
6967
$(if $(findstring stage0,$(1)), \
7068
stage0/lib, \
@@ -79,7 +77,7 @@ ifdef CFG_UNIXY
7977

8078
CFG_PATH_MUNGE := true
8179
CFG_EXE_SUFFIX :=
82-
CFG_LDPATH :=$(CFG_LDPATH):$(CFG_LLVM_LIBDIR)
80+
CFG_LDPATH :=$(CFG_LLVM_LIBDIR)
8381
CFG_RUN_TARG=$(CFG_LDENV)=$(CFG_BUILD_DIR)/$(1)/lib:$(CFG_LDPATH) $(2)
8482
CFG_RUN_TEST=\
8583
$(CFG_LDENV)=$(call CFG_TESTLIB,$(1)):$(CFG_LDPATH) \
@@ -118,7 +116,7 @@ ifdef CFG_WINDOWSY
118116
CFG_EXE_SUFFIX := .exe
119117
CFG_LIB_NAME=$(1).dll
120118
CFG_DEF_SUFFIX := .def
121-
CFG_LDPATH :=$(CFG_LDPATH):$(CFG_LLVM_BINDIR)
119+
CFG_LDPATH :=$(CFG_LLVM_BINDIR)
122120
CFG_LDPATH :=$(CFG_LDPATH):$$PATH
123121
CFG_RUN_TEST=PATH="$(CFG_LDPATH):$(call CFG_TESTLIB,$(1))" $(1)
124122
CFG_RUN_TARG=PATH="$(CFG_BUILD_DIR)/$(1)/lib:$(CFG_LDPATH)" $(2)

mk/stage1.mk

+9
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
stage1/lib/$(CFG_STDLIB): $(STDLIB_CRATE) $(STDLIB_INPUTS) \
22
stage1/rustc$(X) stage0/lib/$(CFG_STDLIB) stage1/intrinsics.bc \
3+
stage1/lib/$(CFG_RUNTIME) stage1/lib/$(CFG_RUSTLLVM) \
34
stage1/glue.o $(LREQ) $(MKFILES)
45
@$(call E, compile_and_link: $@)
56
$(STAGE1) --shared -o $@ $<
@@ -16,6 +17,14 @@ stage1/intrinsics.bc: $(INTRINSICS_BC)
1617
@$(call E, cp: $@)
1718
$(Q)cp $< $@
1819

20+
stage1/lib/$(CFG_RUNTIME): rt/$(CFG_RUNTIME)
21+
@$(call E, cp: $@)
22+
$(Q)cp $< $@
23+
24+
stage1/lib/$(CFG_RUSTLLVM): rustllvm/$(CFG_RUSTLLVM)
25+
@$(call E, cp: $@)
26+
$(Q)cp $< $@
27+
1928
# Due to make not wanting to run the same implicit rules twice on the same
2029
# rule tree (implicit-rule recursion prevention, see "Chains of Implicit
2130
# Rules" in GNU Make manual) we have to re-state the %.o and %.s patterns here

mk/stage2.mk

+9
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
stage2/lib/$(CFG_STDLIB): $(STDLIB_CRATE) $(STDLIB_INPUTS) \
22
stage2/rustc$(X) stage1/lib/$(CFG_STDLIB) stage2/intrinsics.bc \
3+
stage2/lib/$(CFG_RUNTIME) stage2/lib/$(CFG_RUSTLLVM) \
34
stage2/glue.o $(LREQ) $(MKFILES)
45
@$(call E, compile_and_link: $@)
56
$(STAGE2) --shared -o $@ $<
@@ -16,6 +17,14 @@ stage2/intrinsics.bc: $(INTRINSICS_BC)
1617
@$(call E, cp: $@)
1718
$(Q)cp $< $@
1819

20+
stage2/lib/$(CFG_RUNTIME): rt/$(CFG_RUNTIME)
21+
@$(call E, cp: $@)
22+
$(Q)cp $< $@
23+
24+
stage2/lib/$(CFG_RUSTLLVM): rustllvm/$(CFG_RUSTLLVM)
25+
@$(call E, cp: $@)
26+
$(Q)cp $< $@
27+
1928
# Due to make not wanting to run the same implicit rules twice on the same
2029
# rule tree (implicit-rule recursion prevention, see "Chains of Implicit
2130
# Rules" in GNU Make manual) we have to re-state the %.o and %.s patterns here

mk/stage3.mk

+9
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
stage3/lib/$(CFG_STDLIB): $(STDLIB_CRATE) $(STDLIB_INPUTS) \
22
stage3/rustc$(X) stage2/lib/$(CFG_STDLIB) stage3/intrinsics.bc \
3+
stage3/lib/$(CFG_RUNTIME) stage3/lib/$(CFG_RUSTLLVM) \
34
stage3/glue.o $(LREQ) $(MKFILES)
45
@$(call E, compile_and_link: $@)
56
$(STAGE3) --shared -o $@ $<
@@ -16,6 +17,14 @@ stage3/intrinsics.bc: $(INTRINSICS_BC)
1617
@$(call E, cp: $@)
1718
$(Q)cp $< $@
1819

20+
stage3/lib/$(CFG_RUNTIME): rt/$(CFG_RUNTIME)
21+
@$(call E, cp: $@)
22+
$(Q)cp $< $@
23+
24+
stage3/lib/$(CFG_RUSTLLVM): rustllvm/$(CFG_RUSTLLVM)
25+
@$(call E, cp: $@)
26+
$(Q)cp $< $@
27+
1928
# Due to make not wanting to run the same implicit rules twice on the same
2029
# rule tree (implicit-rule recursion prevention, see "Chains of Implicit
2130
# Rules" in GNU Make manual) we have to re-state the %.o and %.s patterns here

0 commit comments

Comments
 (0)