Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #438 by copying rustrt and rustllvm into the stage dirs #636

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions mk/platform.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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, \
Expand All @@ -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) \
Expand Down Expand Up @@ -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)
Expand Down
9 changes: 9 additions & 0 deletions mk/stage1.mk
Original file line number Diff line number Diff line change
@@ -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 $@ $<
Expand All @@ -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
Expand Down
9 changes: 9 additions & 0 deletions mk/stage2.mk
Original file line number Diff line number Diff line change
@@ -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 $@ $<
Expand All @@ -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
Expand Down
9 changes: 9 additions & 0 deletions mk/stage3.mk
Original file line number Diff line number Diff line change
@@ -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 $@ $<
Expand All @@ -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
Expand Down