2011-05-05 15:43:08 -05:00
|
|
|
stage3/std.o: $(STDLIB_CRATE) $(STDLIB_INPUTS) \
|
|
|
|
stage2/rustc$(X) stage2/$(CFG_STDLIB) stage2/intrinsics.bc \
|
|
|
|
$(LREQ) $(MKFILES)
|
2011-05-01 15:18:52 -05:00
|
|
|
@$(call E, compile: $@)
|
|
|
|
$(STAGE2) -c --shared -o $@ $<
|
|
|
|
|
2011-06-14 13:49:18 -05:00
|
|
|
stage3/$(CFG_STDLIB): stage2/std.o stage2/glue.o
|
2011-05-01 15:18:52 -05:00
|
|
|
@$(call E, link: $@)
|
2011-06-14 13:49:18 -05:00
|
|
|
$(Q)gcc $(CFG_GCCISH_CFLAGS) stage2/glue.o $(CFG_GCCISH_LINK_FLAGS) -o \
|
|
|
|
$@ $< -Lstage2 -Lrt -lrustrt
|
2011-05-01 15:18:52 -05:00
|
|
|
|
2011-05-05 20:32:58 -05:00
|
|
|
stage3/librustc.o: $(COMPILER_CRATE) $(COMPILER_INPUTS) $(SREQ2)
|
|
|
|
@$(call E, compile: $@)
|
|
|
|
$(STAGE2) -c --shared -o $@ $<
|
|
|
|
|
2011-06-14 13:49:18 -05:00
|
|
|
stage3/$(CFG_RUSTCLIB): stage2/librustc.o stage2/glue.o
|
2011-05-05 20:32:58 -05:00
|
|
|
@$(call E, link: $@)
|
2011-06-14 13:49:18 -05:00
|
|
|
$(Q)gcc $(CFG_GCCISH_CFLAGS) stage2/glue.o $(CFG_GCCISH_LINK_FLAGS) \
|
|
|
|
-o $@ $< -Lstage2 -Lrustllvm -Lrt -lrustrt -lrustllvm -lstd
|
2011-05-05 20:32:58 -05:00
|
|
|
|
2011-05-04 20:28:30 -05:00
|
|
|
stage3/glue.o: stage2/rustc$(X) stage2/$(CFG_STDLIB) stage2/intrinsics.bc \
|
2011-06-07 15:41:19 -05:00
|
|
|
rustllvm/$(CFG_RUSTLLVM) rt/$(CFG_RUNTIME)
|
2011-05-01 15:18:52 -05:00
|
|
|
@$(call E, generate: $@)
|
|
|
|
$(STAGE2) -c -o $@ --glue
|
|
|
|
|
2011-05-04 20:28:30 -05:00
|
|
|
stage3/intrinsics.bc: $(INTRINSICS_BC)
|
|
|
|
@$(call E, cp: $@)
|
|
|
|
$(Q)cp $< $@
|
|
|
|
|
2011-05-01 15:18:52 -05: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]: $@)
|
2011-05-08 23:10:04 -05:00
|
|
|
$(Q)gcc $(CFG_GCCISH_CFLAGS) -o $@ -c $<
|
2011-05-01 15:18:52 -05:00
|
|
|
|
2011-06-13 15:28:46 -05:00
|
|
|
stage3/%$(X): $(COMPILER_CRATE) $(COMPILER_INPUTS) $(SREQ2)
|
|
|
|
@$(call E, compile_and_link: $@)
|
|
|
|
$(STAGE2) -o $@ $<
|