From 9a12ad62f6bc0ea9ec1164519d1b922642ab34d2 Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Thu, 5 May 2011 21:32:58 -0400 Subject: Add targets for building rustc as a library --- mk/stage3.mk | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'mk/stage3.mk') diff --git a/mk/stage3.mk b/mk/stage3.mk index 0c119d1d..2349af6b 100644 --- a/mk/stage3.mk +++ b/mk/stage3.mk @@ -9,6 +9,15 @@ stage3/$(CFG_STDLIB): stage3/std.o stage3/glue.o $(Q)gcc $(CFG_GCCISH_CFLAGS) stage3/glue.o $(CFG_GCCISH_LINK_FLAGS) -o \ $@ $< -Lstage3 -Lrt -lrustrt +stage3/librustc.o: $(COMPILER_CRATE) $(COMPILER_INPUTS) $(SREQ2) + @$(call E, compile: $@) + $(STAGE2) -c --shared -o $@ $< + +stage3/$(CFG_RUSTCLIB): stage3/librustc.o stage3/glue.o + @$(call E, link: $@) + $(Q)gcc $(CFG_GCC_CFLAGS) stage3/glue.o $(CFG_GCC_LINK_FLAGS) -o $@ $< \ + -Lstage3 -Lrt -lrustrt + stage3/rustc.o: $(COMPILER_CRATE) $(COMPILER_INPUTS) $(SREQ2) @$(call E, compile: $@) $(STAGE2) -c -o $@ $< -- cgit v1.2.3