Skip to content

Commit ff8af3c

Browse files
committed
Use the driver to build stage3. This worked on all 3 platforms for me,
lets see if the bots agree.
1 parent a3be045 commit ff8af3c

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

mk/stage3.mk

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,6 @@ stage3/$(CFG_RUSTCLIB): stage3/librustc.o stage3/glue.o
1818
$(Q)gcc $(CFG_GCCISH_CFLAGS) stage3/glue.o $(CFG_GCCISH_LINK_FLAGS) \
1919
-o $@ $< -Lstage3 -Lrustllvm -Lrt -lrustrt -lrustllvm -lstd
2020

21-
stage3/rustc.o: $(COMPILER_CRATE) $(COMPILER_INPUTS) $(SREQ2)
22-
@$(call E, compile: $@)
23-
$(STAGE2) -c -o $@ $<
24-
2521
stage3/glue.o: stage2/rustc$(X) stage2/$(CFG_STDLIB) stage2/intrinsics.bc \
2622
rustllvm/$(CFG_RUSTLLVM) rt/$(CFG_RUNTIME)
2723
@$(call E, generate: $@)
@@ -41,10 +37,9 @@ stage3/%.o: stage3/%.s
4137
@$(call E, assemble [gcc]: $@)
4238
$(Q)gcc $(CFG_GCCISH_CFLAGS) -o $@ -c $<
4339

44-
stage3/%$(X): stage3/%.o $(SREQ2)
45-
@$(call E, link [gcc]: $@)
46-
$(Q)gcc $(CFG_GCCISH_CFLAGS) stage3/glue.o -o $@ $< \
47-
-Lstage3 -Lrustllvm -Lrt rt/main.o -lrustrt -lrustllvm -lstd -lm
40+
stage3/%$(X): $(COMPILER_CRATE) $(COMPILER_INPUTS) $(SREQ2)
41+
@$(call E, compile_and_link: $@)
42+
$(STAGE2) -o $@ $<
4843
@# dsymutil sometimes fails or prints a warning, but the
4944
@# program still runs. Since it simplifies debugging other
5045
@# programs, I\'ll live with the noise.

0 commit comments

Comments
 (0)