aboutsummaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorPatrick Walton <[email protected]>2011-05-04 18:28:30 -0700
committerPatrick Walton <[email protected]>2011-05-04 18:29:08 -0700
commit04f966f0bc8d092a000e5b6dad0bdd3353ec4efe (patch)
treec958e9b9b37c6b687312137f34d2b561fb3ad49d /mk
parentAdd stage-specific test targets (make check-stage1 etc.) (diff)
downloadrust-04f966f0bc8d092a000e5b6dad0bdd3353ec4efe.tar.xz
rust-04f966f0bc8d092a000e5b6dad0bdd3353ec4efe.zip
build: Build intrinsics.bc
Diffstat (limited to 'mk')
-rw-r--r--mk/stage0.mk6
-rw-r--r--mk/stage1.mk10
-rw-r--r--mk/stage2.mk11
-rw-r--r--mk/stage3.mk9
4 files changed, 29 insertions, 7 deletions
diff --git a/mk/stage0.mk b/mk/stage0.mk
index 493f9e00..e79ae843 100644
--- a/mk/stage0.mk
+++ b/mk/stage0.mk
@@ -10,3 +10,9 @@ stage0/glue.o: stage0/rustc$(X)
stage0/$(CFG_STDLIB): stage0/rustc$(X)
$(Q)touch $@
+
+# TODO: Include as part of the snapshot.
+stage0/intrinsics.bc: $(INTRINSICS_BC)
+ @$(call E, cp: $@)
+ $(Q)cp $< $@
+
diff --git a/mk/stage1.mk b/mk/stage1.mk
index e01942a5..eb30e782 100644
--- a/mk/stage1.mk
+++ b/mk/stage1.mk
@@ -1,5 +1,6 @@
stage1/std.o: $(STDLIB_CRATE) $(STDLIB_INPUTS) \
- stage0/rustc$(X) stage0/$(CFG_STDLIB) $(LREQ) $(MKFILES)
+ stage0/rustc$(X) stage0/$(CFG_STDLIB) stage0/intrinsics.bc \
+ $(LREQ) $(MKFILES)
@$(call E, compile: $@)
$(STAGE0) -c --shared -o $@ $<
@@ -12,10 +13,15 @@ stage1/rustc.o: $(COMPILER_CRATE) $(COMPILER_INPUTS) $(SREQ0)
@$(call E, compile: $@)
$(STAGE0) -c -o $@ $<
-stage1/glue.o: stage0/rustc$(X) stage0/$(CFG_STDLIB) $(LREQ) $(MKFILES)
+stage1/glue.o: stage0/rustc$(X) stage0/$(CFG_STDLIB) stage0/intrinsics.bc \
+ $(LREQ) $(MKFILES)
@$(call E, generate: $@)
$(STAGE0) -c -o $@ --glue
+stage1/intrinsics.bc: $(INTRINSICS_BC)
+ @$(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 600d55e4..74e76c3c 100644
--- a/mk/stage2.mk
+++ b/mk/stage2.mk
@@ -1,4 +1,5 @@
-stage2/std.o: $(STDLIB_CRATE) $(STDLIB_INPUTS) stage1/rustc$(X) $(MKFILES)
+stage2/std.o: $(STDLIB_CRATE) $(STDLIB_INPUTS) stage1/rustc$(X) \
+ stage1/intrinsics.bc $(MKFILES)
@$(call E, compile: $@)
$(STAGE1) -c --shared -o $@ $<
@@ -11,11 +12,15 @@ stage2/rustc.o: $(COMPILER_CRATE) $(COMPILER_INPUTS) $(SREQ1)
@$(call E, compile: $@)
$(STAGE1) -c -o $@ $<
-stage2/glue.o: stage1/rustc$(X) stage1/$(CFG_STDLIB) \
- rustllvm/$(CFG_RUSTLLVM) rt/$(CFG_RUNTIME)
+stage2/glue.o: stage1/rustc$(X) stage1/$(CFG_STDLIB) stage1/intrinsics.bc \
+ rustllvm/$(CFG_RUSTLLVM) rt/$(CFG_RUNTIME)
@$(call E, generate: $@)
$(STAGE1) -c -o $@ --glue
+stage2/intrinsics.bc: $(INTRINSICS_BC)
+ @$(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 8f56637e..427f37f8 100644
--- a/mk/stage3.mk
+++ b/mk/stage3.mk
@@ -1,4 +1,5 @@
-stage3/std.o: $(STDLIB_CRATE) $(STDLIB_INPUTS) stage2/rustc$(X) $(MKFILES)
+stage3/std.o: $(STDLIB_CRATE) $(STDLIB_INPUTS) stage2/rustc$(X) \
+ stage2/intrinsics.bc $(MKFILES)
@$(call E, compile: $@)
$(STAGE2) -c --shared -o $@ $<
@@ -11,11 +12,15 @@ stage3/rustc.o: $(COMPILER_CRATE) $(COMPILER_INPUTS) $(SREQ2)
@$(call E, compile: $@)
$(STAGE2) -c -o $@ $<
-stage3/glue.o: stage2/rustc$(X) stage2/$(CFG_STDLIB) \
+stage3/glue.o: stage2/rustc$(X) stage2/$(CFG_STDLIB) stage2/intrinsics.bc \
rustllvm/$(CFG_RUSTLLVM) rt/$(CFG_RUNTIME)
@$(call E, generate: $@)
$(STAGE2) -c -o $@ --glue
+stage3/intrinsics.bc: $(INTRINSICS_BC)
+ @$(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