Skip to content

Commit 5e5f00b

Browse files
committed
---
yaml --- r: 1948 b: refs/heads/master c: 6d857c0 h: refs/heads/master v: v3
1 parent e935673 commit 5e5f00b

File tree

2 files changed

+33
-1
lines changed

2 files changed

+33
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: 3c1de96cda33e9547adda14dc66294752c99e4c3
2+
refs/heads/master: 6d857c0c843e9aec5fe3d0404aca643aa5b60ef3

trunk/Makefile.in

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -505,6 +505,38 @@ stage2/glue.bc: stage2/rustc$(X) stage1/$(CFG_STDLIB) \
505505
@$(call E, generate: $@)
506506
$(STAGE2) -o $@ -glue
507507

508+
# Due to make not wanting to run the same implicit rules twice on the same
509+
# rule tree (implicit-rule recursion prevention, see "Chains of Implicit
510+
# Rules" in GNU Make manual) we have to re-state the %.o and %.s patterns here
511+
# for different directories, to handle cases where (say) a test relies on a
512+
# compiler that relies on a .o file.
513+
514+
stage0/%.o: stage0/%.s
515+
@$(call E, assemble [llvm]: $@)
516+
$(Q)gcc $(CFG_GCC_CFLAGS) -o $@ -c $<
517+
518+
stage0/%.s: stage0/%.bc
519+
@$(call E, compile [llvm]: $@)
520+
$(Q)$(CFG_LLVM_BINDIR)/llc $(CFG_LLC_CFLAGS) -o $@ $<
521+
522+
stage1/%.o: stage1/%.s
523+
@$(call E, assemble [llvm]: $@)
524+
$(Q)gcc $(CFG_GCC_CFLAGS) -o $@ -c $<
525+
526+
stage1/%.s: stage1/%.bc
527+
@$(call E, compile [llvm]: $@)
528+
$(Q)$(CFG_LLVM_BINDIR)/llc $(CFG_LLC_CFLAGS) -o $@ $<
529+
530+
stage2/%.o: stage2/%.s
531+
@$(call E, assemble [llvm]: $@)
532+
$(Q)gcc $(CFG_GCC_CFLAGS) -o $@ -c $<
533+
534+
stage2/%.s: stage2/%.bc
535+
@$(call E, compile [llvm]: $@)
536+
$(Q)$(CFG_LLVM_BINDIR)/llc $(CFG_LLC_CFLAGS) -o $@ $<
537+
538+
539+
508540
######################################################################
509541
# Library and boot rules
510542
######################################################################

0 commit comments

Comments
 (0)