Skip to content

Commit 984caa3

Browse files
ericktbrson
authored andcommitted
put librustrt and librustllvm in stageN dirs. Issue #438
1 parent deca79f commit 984caa3

File tree

4 files changed

+29
-4
lines changed

4 files changed

+29
-4
lines changed

mk/platform.mk

Lines changed: 2 additions & 4 deletions
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

Lines changed: 9 additions & 0 deletions
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) --lib -o $@ $<
@@ -22,6 +23,14 @@ stage1/intrinsics.bc: $(INTRINSICS_BC)
2223
@$(call E, cp: $@)
2324
$(Q)cp $< $@
2425

26+
stage1/lib/$(CFG_RUNTIME): rt/$(CFG_RUNTIME)
27+
@$(call E, cp: $@)
28+
$(Q)cp $< $@
29+
30+
stage1/lib/$(CFG_RUSTLLVM): rustllvm/$(CFG_RUSTLLVM)
31+
@$(call E, cp: $@)
32+
$(Q)cp $< $@
33+
2534
# Due to make not wanting to run the same implicit rules twice on the same
2635
# rule tree (implicit-rule recursion prevention, see "Chains of Implicit
2736
# Rules" in GNU Make manual) we have to re-state the %.o and %.s patterns here

mk/stage2.mk

Lines changed: 9 additions & 0 deletions
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) --lib -o $@ $<
@@ -22,6 +23,14 @@ stage2/intrinsics.bc: $(INTRINSICS_BC)
2223
@$(call E, cp: $@)
2324
$(Q)cp $< $@
2425

26+
stage2/lib/$(CFG_RUNTIME): rt/$(CFG_RUNTIME)
27+
@$(call E, cp: $@)
28+
$(Q)cp $< $@
29+
30+
stage2/lib/$(CFG_RUSTLLVM): rustllvm/$(CFG_RUSTLLVM)
31+
@$(call E, cp: $@)
32+
$(Q)cp $< $@
33+
2534
# Due to make not wanting to run the same implicit rules twice on the same
2635
# rule tree (implicit-rule recursion prevention, see "Chains of Implicit
2736
# Rules" in GNU Make manual) we have to re-state the %.o and %.s patterns here

mk/stage3.mk

Lines changed: 9 additions & 0 deletions
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) --lib -o $@ $<
@@ -22,6 +23,14 @@ stage3/intrinsics.bc: $(INTRINSICS_BC)
2223
@$(call E, cp: $@)
2324
$(Q)cp $< $@
2425

26+
stage3/lib/$(CFG_RUNTIME): rt/$(CFG_RUNTIME)
27+
@$(call E, cp: $@)
28+
$(Q)cp $< $@
29+
30+
stage3/lib/$(CFG_RUSTLLVM): rustllvm/$(CFG_RUSTLLVM)
31+
@$(call E, cp: $@)
32+
$(Q)cp $< $@
33+
2534
# Due to make not wanting to run the same implicit rules twice on the same
2635
# rule tree (implicit-rule recursion prevention, see "Chains of Implicit
2736
# Rules" in GNU Make manual) we have to re-state the %.o and %.s patterns here

0 commit comments

Comments
 (0)