aboutsummaryrefslogtreecommitdiff
path: root/mk/stage2.mk
diff options
context:
space:
mode:
Diffstat (limited to 'mk/stage2.mk')
-rw-r--r--mk/stage2.mk9
1 files changed, 9 insertions, 0 deletions
diff --git a/mk/stage2.mk b/mk/stage2.mk
index f2eba3b0..3da28236 100644
--- a/mk/stage2.mk
+++ b/mk/stage2.mk
@@ -9,6 +9,15 @@ stage2/$(CFG_STDLIB): stage2/std.o stage2/glue.o
$(Q)gcc $(CFG_GCCISH_CFLAGS) stage2/glue.o $(CFG_GCCISH_LINK_FLAGS) -o \
$@ $< -Lstage2 -Lrt -lrustrt
+stage2/librustc.o: $(COMPILER_CRATE) $(COMPILER_INPUTS) $(SREQ1)
+ @$(call E, compile: $@)
+ $(STAGE1) -c --shared -o $@ $<
+
+stage2/$(CFG_RUSTCLIB): stage2/librustc.o stage2/glue.o
+ @$(call E, link: $@)
+ $(Q)gcc $(CFG_GCC_CFLAGS) stage2/glue.o $(CFG_GCC_LINK_FLAGS) -o $@ $< \
+ -Lstage2 -Lrt -lrustrt
+
stage2/rustc.o: $(COMPILER_CRATE) $(COMPILER_INPUTS) $(SREQ1)
@$(call E, compile: $@)
$(STAGE1) -c -o $@ $<