0
0
mirror of https://github.com/rust-lang/rust.git synced 2024-11-29 10:05:55 +01:00
rust/mk/rustllvm.mk
Rafael Ávila de Espíndola 01675f34e0 Remove old hack of creating a .a file with code that existed both in rust
and on newer versions of llvm.
2011-07-25 16:18:39 -04:00

25 lines
925 B
Makefile

######################################################################
# rustc LLVM-extensions (C++) library variables and rules
######################################################################
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_OBJS_OBJS := $(RUSTLLVM_OBJS_CS:.cpp=.o)
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) \
$(CFG_LLVM_LDFLAGS),$(RUSTLLVM_DEF))
rustllvm/%.o: rustllvm/%.cpp $(MKFILES)
@$(call E, compile: $@)
$(Q)$(call CFG_COMPILE_C, $@, $(CFG_LLVM_CXXFLAGS) $(RUSTLLVM_INCS)) $<