aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGraydon Hoare <[email protected]>2011-03-18 18:32:31 -0700
committerGraydon Hoare <[email protected]>2011-03-18 18:33:22 -0700
commitb7972d34ed489f54e14972c176c2d335ed4f26c2 (patch)
treee4b473cff39d553b061400c91788a54bf3b0a425
parentRun rustc stages using proper LD_LIBRARY_PATH. (diff)
downloadrust-b7972d34ed489f54e14972c176c2d335ed4f26c2.tar.xz
rust-b7972d34ed489f54e14972c176c2d335ed4f26c2.zip
Add support for building glue.o.
-rw-r--r--Makefile.in18
1 files changed, 17 insertions, 1 deletions
diff --git a/Makefile.in b/Makefile.in
index b273884f..f1c4ef2e 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -105,7 +105,7 @@ ifdef CFG_UNIXY
CFG_VALGRIND += --leak-check=full \
--error-exitcode=1 \
--quiet --vex-iropt-level=0 \
- --suppressions=etc/x86.supp
+ --suppressions=$(S)src/etc/x86.supp
endif
endif
@@ -113,6 +113,8 @@ CFG_RUNTIME :=$(call CFG_LIB_NAME,rustrt)
CFG_LLVMEXT :=$(call CFG_LIB_NAME,llvmext)
CFG_STDLIB :=$(call CFG_LIB_NAME,std)
+CFG_LLC_CFLAGS := -march=x86
+
ifdef CFG_GCC
CFG_INFO := $(info cfg: using gcc)
CFG_GCC_CFLAGS += -Wall -Werror -fno-rtti -fno-exceptions -g
@@ -331,6 +333,7 @@ all: boot/rustboot$(X) \
rt/$(CFG_RUNTIME) \
llvmext/$(CFG_LLVMEXT) \
stage0/rustc$(X) \
+ stage0/glue.o \
$(GENERATED)
rt/$(CFG_RUNTIME): $(RUNTIME_OBJS) $(MKFILES) $(RUNTIME_HDR)
@@ -400,6 +403,19 @@ llvmext/%.o: llvmext/%.cpp $(MKFILES)
@$(call E, lex-gen: $@)
$(Q)ocamllex$(OPT) -q -o $@ $<
+%.o: %.s
+ @$(call E, assemble [llvm]: $@)
+ $(Q)gcc $(CFG_GCC_CFLAGS) -o $@ -c $<
+
+%.ll: %.bc
+ @$(call E, dis [llvm]: $@)
+ $(Q)$(CFG_LLVM_BINDIR)/llvm-dis -o $@ $<
+
+
+%.s: %.bc
+ @$(call E, compile [llvm]: $@)
+ $(Q)$(CFG_LLVM_BINDIR)/llc $(CFG_LLC_CFLAGS) -o $@ $<
+
######################################################################
# Cleanup