Skip to content

Commit 2830b3d

Browse files
committed
---
yaml --- r: 1743 b: refs/heads/master c: c4e0085 h: refs/heads/master i: 1741: 6632237 1739: 3d65531 1735: 787a63f 1727: c39da61 v: v3
1 parent 4c7b12b commit 2830b3d

File tree

2 files changed

+72
-12
lines changed

2 files changed

+72
-12
lines changed

[refs]

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: a36b44d33d40dd617141a50be067e58a50f70cc3
2+
refs/heads/master: c4e00852918b91a8a365475cb5cce694ba027d9e

trunk/Makefile.in

+71-11
Original file line numberDiff line numberDiff line change
@@ -186,9 +186,9 @@ X := $(CFG_EXE_SUFFIX)
186186
VPATH := $(S)doc $(S)src
187187

188188
# Compilers we build, we now know how to run.
189-
BOOT := $(Q)OCAMLRUNPARAM="b1" boot/rustboot$(X) $(CFG_BOOT_FLAGS) -L stage0
190-
STAGE0 := $(Q)$(CFG_RUN_TARG) stage0/rustc$(X) $(CFG_RUSTC_FLAGS) -L stage1
191-
STAGE1 := $(Q)$(CFG_RUN_TARG) stage1/rustc$(X) $(CFG_RUSTC_FLAGS) -L stage2
189+
BOOT := $(Q)OCAMLRUNPARAM="b1" boot/rustboot$(X) $(CFG_BOOT_FLAGS) -L boot
190+
STAGE0 := $(Q)$(CFG_RUN_TARG) stage0/rustc$(X) $(CFG_RUSTC_FLAGS) -L stage0
191+
STAGE1 := $(Q)$(CFG_RUN_TARG) stage1/rustc$(X) $(CFG_RUSTC_FLAGS) -L stage1
192192

193193
# "Source" files we generate in builddir along the way.
194194
GENERATED := boot/fe/lexer.ml boot/version.ml
@@ -384,6 +384,7 @@ boot/version.ml: $(MKFILES)
384384
--pretty=format:'let version = "prerelease (%h %ci)";;' >$@ || exit 1
385385

386386

387+
387388
boot/$(CFG_STDLIB): $(S)src/$(STDLIB_CRATE) $(STDLIB_INPUTS) \
388389
boot/rustboot$(X) $(MKFILES)
389390
@$(call E, compile: $@)
@@ -394,6 +395,17 @@ stage0/$(CFG_STDLIB): $(S)src/$(STDLIB_CRATE) $(STDLIB_INPUTS) \
394395
@$(call E, compile: $@)
395396
$(STAGE0) -shared -o $@ $<
396397

398+
stage1/$(CFG_STDLIB): $(S)src/$(STDLIB_CRATE) $(STDLIB_INPUTS) \
399+
stage1/rustc$(X) $(MKFILES)
400+
@$(call E, compile: $@)
401+
$(STAGE1) -shared -o $@ $<
402+
403+
stage2/$(CFG_STDLIB): $(S)src/$(STDLIB_CRATE) $(STDLIB_INPUTS) \
404+
stage2/rustc$(X) $(MKFILES)
405+
@$(call E, compile: $@)
406+
$(STAGE2) -shared -o $@ $<
407+
408+
397409

398410
stage0/rustc$(X): $(S)src/$(COMPILER_CRATE) $(COMPILER_INPUTS) \
399411
$(BREQ)
@@ -407,6 +419,13 @@ stage1/rustc$(X): $(S)src/$(COMPILER_CRATE) $(COMPILER_INPUTS) \
407419
$(STAGE0) -o $@ $<
408420
$(Q)chmod 0755 $@
409421

422+
stage2/rustc$(X): $(S)src/$(COMPILER_CRATE) $(COMPILER_INPUTS) \
423+
$(SREQ1) stage1/$(CFG_STDLIB)
424+
@$(call E, compile: $@)
425+
$(STAGE1) -o $@ $<
426+
$(Q)chmod 0755 $@
427+
428+
410429

411430
stage0/glue.bc: stage0/rustc$(X) stage0/$(CFG_STDLIB) \
412431
llvmext/$(CFG_LLVMEXT) rt/$(CFG_RUNTIME)
@@ -418,6 +437,11 @@ stage1/glue.bc: stage1/rustc$(X) stage1/$(CFG_STDLIB) \
418437
@$(call E, generate: $@)
419438
$(STAGE1) -o $@ -glue
420439

440+
stage2/glue.bc: stage2/rustc$(X) stage2/$(CFG_STDLIB) \
441+
llvmext/$(CFG_LLVMEXT) rt/$(CFG_RUNTIME)
442+
@$(call E, generate: $@)
443+
$(STAGE2) -o $@ -glue
444+
421445
######################################################################
422446
# Library and boot rules
423447
######################################################################
@@ -449,14 +473,6 @@ llvmext/%.o: llvmext/%.cpp $(MKFILES)
449473
# Testing rules
450474
######################################################################
451475

452-
%.boot$(X): %.rs $(BREQ)
453-
@$(call E, compile [boot]: $@)
454-
$(BOOT) -o $@ $<
455-
456-
%.boot$(X): %.rc $(BREQ)
457-
@$(call E, compile [boot]: $@)
458-
$(BOOT) -o $@ $<
459-
460476
%.stage0$(X): %.stage0.o rt/$(CFG_RUNTIME) stage0/glue.o
461477
@$(call E, link [llvm]: $@)
462478
$(Q)gcc $(CFG_GCC_CFLAGS) stage0/glue.o -o $@ $< -Lstage0 -lrustrt
@@ -465,6 +481,32 @@ llvmext/%.o: llvmext/%.cpp $(MKFILES)
465481
@# programs, I\'ll live with the noise.
466482
-$(Q)$(DSYMUTIL) $@
467483

484+
%.stage1(X): %.stage1.o rt/$(CFG_RUNTIME) stage1/glue.o
485+
@$(call E, link [llvm]: $@)
486+
$(Q)gcc $(CFG_GCC_CFLAGS) stage1/glue.o -o $@ $< -Lstage1 -lrustrt
487+
@# dsymutil sometimes fails or prints a warning, but the
488+
@# program still runs. Since it simplifies debugging other
489+
@# programs, I\'ll live with the noise.
490+
-$(Q)$(DSYMUTIL) $@
491+
492+
%.stage2(X): %.stage2.o rt/$(CFG_RUNTIME) stage2/glue.o
493+
@$(call E, link [llvm]: $@)
494+
$(Q)gcc $(CFG_GCC_CFLAGS) stage2/glue.o -o $@ $< -Lstage2 -lrustrt
495+
@# dsymutil sometimes fails or prints a warning, but the
496+
@# program still runs. Since it simplifies debugging other
497+
@# programs, I\'ll live with the noise.
498+
-$(Q)$(DSYMUTIL) $@
499+
500+
501+
502+
%.boot$(X): %.rs $(BREQ)
503+
@$(call E, compile [boot]: $@)
504+
$(BOOT) -o $@ $<
505+
506+
%.boot$(X): %.rc $(BREQ)
507+
@$(call E, compile [boot]: $@)
508+
$(BOOT) -o $@ $<
509+
468510
%.stage0.bc: %.rc $(SREQ0)
469511
@$(call E, compile [stage0]: $@)
470512
$(STAGE0) -o $@ $<
@@ -473,6 +515,24 @@ llvmext/%.o: llvmext/%.cpp $(MKFILES)
473515
@$(call E, compile [stage0]: $@)
474516
$(STAGE0) -o $@ $<
475517

518+
%.stage1.bc: %.rc $(SREQ1)
519+
@$(call E, compile [stage1]: $@)
520+
$(STAGE1) -o $@ $<
521+
522+
%.stage1.bc: %.rs $(SREQ1)
523+
@$(call E, compile [stage1]: $@)
524+
$(STAGE1) -o $@ $<
525+
526+
%.stage2.bc: %.rc $(SREQ2)
527+
@$(call E, compile [stage2]: $@)
528+
$(STAGE2) -o $@ $<
529+
530+
%.stage2.bc: %.rs $(SREQ2)
531+
@$(call E, compile [stage2]: $@)
532+
$(STAGE2) -o $@ $<
533+
534+
535+
476536
%.o: %.s
477537
@$(call E, assemble [llvm]: $@)
478538
$(Q)gcc $(CFG_GCC_CFLAGS) -o $@ -c $<

0 commit comments

Comments
 (0)