diff options
| author | Graydon Hoare <[email protected]> | 2011-03-31 14:58:17 -0700 |
|---|---|---|
| committer | Graydon Hoare <[email protected]> | 2011-03-31 14:58:44 -0700 |
| commit | 6d857c0c843e9aec5fe3d0404aca643aa5b60ef3 (patch) | |
| tree | 111487ab9a6d40bb4815d09a4e254ef55e936c82 /Makefile.in | |
| parent | rustc: Use the crate index to look up defs (diff) | |
| download | rust-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.in | 32 |
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 ###################################################################### |