0
0
mirror of https://github.com/rust-lang/rust.git synced 2024-11-29 18:06:44 +01:00
rust/mk/stage3.mk

43 lines
1.5 KiB
Makefile
Raw Normal View History

2011-05-05 22:43:08 +02:00
stage3/std.o: $(STDLIB_CRATE) $(STDLIB_INPUTS) \
stage2/rustc$(X) stage2/$(CFG_STDLIB) stage2/intrinsics.bc \
$(LREQ) $(MKFILES)
2011-05-01 22:18:52 +02:00
@$(call E, compile: $@)
$(STAGE2) -c --shared -o $@ $<
stage3/$(CFG_STDLIB): stage3/std.o stage3/glue.o
@$(call E, link: $@)
$(Q)gcc $(CFG_GCCISH_CFLAGS) stage3/glue.o $(CFG_GCCISH_LINK_FLAGS) -o \
$@ $< -Lstage3 -Lrt -lrustrt
2011-05-01 22:18:52 +02:00
stage3/rustc.o: $(COMPILER_CRATE) $(COMPILER_INPUTS) $(SREQ2)
@$(call E, compile: $@)
$(STAGE2) -c -o $@ $<
2011-05-05 03:28:30 +02:00
stage3/glue.o: stage2/rustc$(X) stage2/$(CFG_STDLIB) stage2/intrinsics.bc \
2011-05-01 22:18:52 +02:00
rustllvm/$(CFG_RUSTLLVM) rt/$(CFG_RUNTIME)
@$(call E, generate: $@)
$(STAGE2) -c -o $@ --glue
2011-05-05 03:28:30 +02:00
stage3/intrinsics.bc: $(INTRINSICS_BC)
@$(call E, cp: $@)
$(Q)cp $< $@
2011-05-01 22:18:52 +02:00
# 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.
stage3/%.o: stage3/%.s
@$(call E, assemble [gcc]: $@)
$(Q)gcc $(CFG_GCCISH_CFLAGS) -o $@ -c $<
2011-05-01 22:18:52 +02:00
stage3/%$(X): stage3/%.o $(SREQ2)
@$(call E, link [gcc]: $@)
$(Q)gcc $(CFG_GCCISH_CFLAGS) stage3/glue.o -o $@ $< \
2011-05-01 22:18:52 +02:00
-Lstage3 -Lrustllvm -Lrt -lrustrt -lrustllvm -lstd -lm
@# dsymutil sometimes fails or prints a warning, but the
@# program still runs. Since it simplifies debugging other
@# programs, I\'ll live with the noise.
-$(Q)$(CFG_DSYMUTIL) $@