rust/mk/stage2.mk

29 lines
1.0 KiB
Makefile
Raw Normal View History

stage2/$(CFG_STDLIB): $(STDLIB_CRATE) $(STDLIB_INPUTS) \
stage2/rustc$(X) stage1/$(CFG_STDLIB) stage2/intrinsics.bc \
stage2/glue.o $(LREQ) $(MKFILES)
@$(call E, compile_and_link: $@)
$(STAGE2) --shared -o $@ $<
2011-05-01 22:18:52 +02:00
stage2/glue.o: stage2/rustc$(X) stage1/$(CFG_STDLIB) stage1/intrinsics.bc \
2011-05-05 03:28:30 +02:00
rustllvm/$(CFG_RUSTLLVM) rt/$(CFG_RUNTIME)
2011-05-01 22:18:52 +02:00
@$(call E, generate: $@)
$(STAGE2) -c -o $@ --glue
2011-05-01 22:18:52 +02:00
2011-05-05 03:28:30 +02:00
stage2/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.
stage2/%.o: stage2/%.s
@$(call E, assemble [gcc]: $@)
$(Q)gcc $(CFG_GCCISH_CFLAGS) -o $@ -c $<
2011-05-01 22:18:52 +02:00
stage2/%$(X): $(COMPILER_CRATE) $(COMPILER_INPUTS) $(SREQ1)
@$(call E, compile_and_link: $@)
$(STAGE1) -o $@ $<