diff options
| author | Rafael Ávila de Espíndola <respindola@mozilla.com> | 2011-07-25 16:18:39 -0400 |
|---|---|---|
| committer | Rafael Ávila de Espíndola <respindola@mozilla.com> | 2011-07-25 16:18:39 -0400 |
| commit | 01675f34e06f5e59c71d28179dd4f62fe5437403 (patch) | |
| tree | 6b378ca862a57a4eddc2b224f5eaaf8932fd0337 | |
| parent | 758c11b22c2ae02520b8983cb681726f86dad9de (diff) | |
| download | rust-01675f34e06f5e59c71d28179dd4f62fe5437403.tar.gz rust-01675f34e06f5e59c71d28179dd4f62fe5437403.zip | |
Remove old hack of creating a .a file with code that existed both in rust
and on newer versions of llvm.
| -rw-r--r-- | mk/rustllvm.mk | 23 |
1 files changed, 3 insertions, 20 deletions
diff --git a/mk/rustllvm.mk b/mk/rustllvm.mk index efe32395cea..c519ea15f0d 100644 --- a/mk/rustllvm.mk +++ b/mk/rustllvm.mk @@ -2,39 +2,22 @@ # rustc LLVM-extensions (C++) library variables and rules ###################################################################### -RUSTLLVM_LIB_CS := $(addprefix rustllvm/, Passes.cpp) - -RUSTLLVM_OBJS_CS := $(addprefix rustllvm/, RustWrapper.cpp) +RUSTLLVM_OBJS_CS := $(addprefix rustllvm/, Passes.cpp RustWrapper.cpp) RUSTLLVM_DEF := rustllvm/rustllvm$(CFG_DEF_SUFFIX) RUSTLLVM_INCS := -iquote $(CFG_LLVM_INCDIR) \ -iquote $(S)src/rustllvm/include -RUSTLLVM_LIB_OBJS := $(RUSTLLVM_LIB_CS:.cpp=.o) RUSTLLVM_OBJS_OBJS := $(RUSTLLVM_OBJS_CS:.cpp=.o) - -# FIXME: Building a .a is a hack so that we build with both older and newer -# versions of LLVM. In newer versions some of the bits of this library are -# already in LLVM itself, so they are skipped. -rustllvm/rustllvmbits.a: $(RUSTLLVM_LIB_OBJS) - @$(call E, archive: $@) - $(Q)rm -f $@ - $(Q)$(CFG_GCCISH_CROSS)ar crs $@ $^ - $(Q)$(CFG_GCCISH_CROSS)ranlib $@ - -# Note: We pass $(CFG_LLVM_LIBS) twice to fix the windows link since -# it has no -whole-archive. -rustllvm/$(CFG_RUSTLLVM): rustllvm/rustllvmbits.a $(RUSTLLVM_OBJS_OBJS) \ +rustllvm/$(CFG_RUSTLLVM): $(RUSTLLVM_OBJS_OBJS) \ $(MKFILES) $(RUSTLLVM_DEF) @$(call E, link: $@) $(Q)$(call CFG_LINK_C,$@,$(RUSTLLVM_OBJS_OBJS) \ $(CFG_GCCISH_PRE_LIB_FLAGS) $(CFG_LLVM_LIBS) \ - $(CFG_GCCISH_POST_LIB_FLAGS) rustllvm/rustllvmbits.a \ - $(CFG_LLVM_LIBS) \ + $(CFG_GCCISH_POST_LIB_FLAGS) \ $(CFG_LLVM_LDFLAGS),$(RUSTLLVM_DEF)) - rustllvm/%.o: rustllvm/%.cpp $(MKFILES) @$(call E, compile: $@) $(Q)$(call CFG_COMPILE_C, $@, $(CFG_LLVM_CXXFLAGS) $(RUSTLLVM_INCS)) $< |
