aboutsummaryrefslogtreecommitdiff
path: root/Makefile.in
diff options
context:
space:
mode:
authorGraydon Hoare <[email protected]>2011-03-31 14:58:17 -0700
committerGraydon Hoare <[email protected]>2011-03-31 14:58:44 -0700
commit6d857c0c843e9aec5fe3d0404aca643aa5b60ef3 (patch)
tree111487ab9a6d40bb4815d09a4e254ef55e936c82 /Makefile.in
parentrustc: Use the crate index to look up defs (diff)
downloadrust-6d857c0c843e9aec5fe3d0404aca643aa5b60ef3.tar.xz
rust-6d857c0c843e9aec5fe3d0404aca643aa5b60ef3.zip
Fix error where make check would not produce compilers first, due to make's infinite-recursion-prevention heuristic.
Diffstat (limited to 'Makefile.in')
-rw-r--r--Makefile.in32
1 files changed, 32 insertions, 0 deletions
diff --git a/Makefile.in b/Makefile.in
index 6125424c..3d042e33 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -505,6 +505,38 @@ stage2/glue.bc: stage2/rustc$(X) stage1/$(CFG_STDLIB) \
@$(call E, generate: $@)
$(STAGE2) -o $@ -glue
+# 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
+# for different directories, to handle cases where (say) a test relies on a
+# compiler that relies on a .o file.
+
+stage0/%.o: stage0/%.s
+ @$(call E, assemble [llvm]: $@)
+ $(Q)gcc $(CFG_GCC_CFLAGS) -o $@ -c $<
+
+stage0/%.s: stage0/%.bc
+ @$(call E, compile [llvm]: $@)
+ $(Q)$(CFG_LLVM_BINDIR)/llc $(CFG_LLC_CFLAGS) -o $@ $<
+
+stage1/%.o: stage1/%.s
+ @$(call E, assemble [llvm]: $@)
+ $(Q)gcc $(CFG_GCC_CFLAGS) -o $@ -c $<
+
+stage1/%.s: stage1/%.bc
+ @$(call E, compile [llvm]: $@)
+ $(Q)$(CFG_LLVM_BINDIR)/llc $(CFG_LLC_CFLAGS) -o $@ $<
+
+stage2/%.o: stage2/%.s
+ @$(call E, assemble [llvm]: $@)
+ $(Q)gcc $(CFG_GCC_CFLAGS) -o $@ -c $<
+
+stage2/%.s: stage2/%.bc
+ @$(call E, compile [llvm]: $@)
+ $(Q)$(CFG_LLVM_BINDIR)/llc $(CFG_LLC_CFLAGS) -o $@ $<
+
+
+
######################################################################
# Library and boot rules
######################################################################