From 90bb68249700fa3faea8f5c496970da51afaf9fa Mon Sep 17 00:00:00 2001 From: Erick Tryzelaar Date: Thu, 7 Jul 2011 06:39:11 -0700 Subject: [PATCH] put librustrt and librustllvm in stageN dirs. Closes #438. --- mk/platform.mk | 6 ++---- mk/stage1.mk | 9 +++++++++ mk/stage2.mk | 9 +++++++++ mk/stage3.mk | 9 +++++++++ 4 files changed, 29 insertions(+), 4 deletions(-) diff --git a/mk/platform.mk b/mk/platform.mk index 84fcf0705c334..e989e8d4371a0 100644 --- a/mk/platform.mk +++ b/mk/platform.mk @@ -63,8 +63,6 @@ ifneq ($(findstring MINGW,$(CFG_OSTYPE)),) CFG_WINDOWSY := 1 endif -CFG_LDPATH :=$(CFG_BUILD_DIR)/rt -CFG_LDPATH :=$(CFG_LDPATH):$(CFG_BUILD_DIR)/rustllvm CFG_TESTLIB=$(CFG_BUILD_DIR)/$(strip \ $(if $(findstring stage0,$(1)), \ stage0/lib, \ @@ -79,7 +77,7 @@ ifdef CFG_UNIXY CFG_PATH_MUNGE := true CFG_EXE_SUFFIX := - CFG_LDPATH :=$(CFG_LDPATH):$(CFG_LLVM_LIBDIR) + CFG_LDPATH :=$(CFG_LLVM_LIBDIR) CFG_RUN_TARG=$(CFG_LDENV)=$(CFG_BUILD_DIR)/$(1)/lib:$(CFG_LDPATH) $(2) CFG_RUN_TEST=\ $(CFG_LDENV)=$(call CFG_TESTLIB,$(1)):$(CFG_LDPATH) \ @@ -118,7 +116,7 @@ ifdef CFG_WINDOWSY CFG_EXE_SUFFIX := .exe CFG_LIB_NAME=$(1).dll CFG_DEF_SUFFIX := .def - CFG_LDPATH :=$(CFG_LDPATH):$(CFG_LLVM_BINDIR) + 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)/lib:$(CFG_LDPATH)" $(2) diff --git a/mk/stage1.mk b/mk/stage1.mk index 883c5e07f5417..577e2f588dc9c 100644 --- a/mk/stage1.mk +++ b/mk/stage1.mk @@ -1,5 +1,6 @@ stage1/lib/$(CFG_STDLIB): $(STDLIB_CRATE) $(STDLIB_INPUTS) \ stage1/rustc$(X) stage0/lib/$(CFG_STDLIB) stage1/intrinsics.bc \ + stage1/lib/$(CFG_RUNTIME) stage1/lib/$(CFG_RUSTLLVM) \ stage1/glue.o $(LREQ) $(MKFILES) @$(call E, compile_and_link: $@) $(STAGE1) --shared -o $@ $< @@ -16,6 +17,14 @@ stage1/intrinsics.bc: $(INTRINSICS_BC) @$(call E, cp: $@) $(Q)cp $< $@ +stage1/lib/$(CFG_RUNTIME): rt/$(CFG_RUNTIME) + @$(call E, cp: $@) + $(Q)cp $< $@ + +stage1/lib/$(CFG_RUSTLLVM): rustllvm/$(CFG_RUSTLLVM) + @$(call E, cp: $@) + $(Q)cp $< $@ + # Due to make not wanting to run the same implicit rules twice on the same # rule tree (implicit-rule recursion prevention, see "Chains of Implicit # Rules" in GNU Make manual) we have to re-state the %.o and %.s patterns here diff --git a/mk/stage2.mk b/mk/stage2.mk index 12d1cad400f59..a9753bf72f3c4 100644 --- a/mk/stage2.mk +++ b/mk/stage2.mk @@ -1,5 +1,6 @@ stage2/lib/$(CFG_STDLIB): $(STDLIB_CRATE) $(STDLIB_INPUTS) \ stage2/rustc$(X) stage1/lib/$(CFG_STDLIB) stage2/intrinsics.bc \ + stage2/lib/$(CFG_RUNTIME) stage2/lib/$(CFG_RUSTLLVM) \ stage2/glue.o $(LREQ) $(MKFILES) @$(call E, compile_and_link: $@) $(STAGE2) --shared -o $@ $< @@ -16,6 +17,14 @@ stage2/intrinsics.bc: $(INTRINSICS_BC) @$(call E, cp: $@) $(Q)cp $< $@ +stage2/lib/$(CFG_RUNTIME): rt/$(CFG_RUNTIME) + @$(call E, cp: $@) + $(Q)cp $< $@ + +stage2/lib/$(CFG_RUSTLLVM): rustllvm/$(CFG_RUSTLLVM) + @$(call E, cp: $@) + $(Q)cp $< $@ + # Due to make not wanting to run the same implicit rules twice on the same # rule tree (implicit-rule recursion prevention, see "Chains of Implicit # Rules" in GNU Make manual) we have to re-state the %.o and %.s patterns here diff --git a/mk/stage3.mk b/mk/stage3.mk index dfc7eff219080..c05145a9a5e17 100644 --- a/mk/stage3.mk +++ b/mk/stage3.mk @@ -1,5 +1,6 @@ stage3/lib/$(CFG_STDLIB): $(STDLIB_CRATE) $(STDLIB_INPUTS) \ stage3/rustc$(X) stage2/lib/$(CFG_STDLIB) stage3/intrinsics.bc \ + stage3/lib/$(CFG_RUNTIME) stage3/lib/$(CFG_RUSTLLVM) \ stage3/glue.o $(LREQ) $(MKFILES) @$(call E, compile_and_link: $@) $(STAGE3) --shared -o $@ $< @@ -16,6 +17,14 @@ stage3/intrinsics.bc: $(INTRINSICS_BC) @$(call E, cp: $@) $(Q)cp $< $@ +stage3/lib/$(CFG_RUNTIME): rt/$(CFG_RUNTIME) + @$(call E, cp: $@) + $(Q)cp $< $@ + +stage3/lib/$(CFG_RUSTLLVM): rustllvm/$(CFG_RUSTLLVM) + @$(call E, cp: $@) + $(Q)cp $< $@ + # Due to make not wanting to run the same implicit rules twice on the same # rule tree (implicit-rule recursion prevention, see "Chains of Implicit # Rules" in GNU Make manual) we have to re-state the %.o and %.s patterns here