llvm.org GIT mirror llvm / 64f5838
llvm-config: Fixup r197380, tweak for cross compilation. SYSTEM_LIBS should be --host's in BuildTools/llvm-config. FIXME: Host's llvm-config is not generated. It's for target's. Host tools, aka "BuildTools", in utils, do not require llvm-config to build. For example with --host=i686-pc-mingw32 --build=linux, $ BuildTools/Release+Asserts/bin/llvm-config --libs support -lLLVMSupport -lpthread -lshell32 -lpsapi -limagehlp -lm git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197382 91177308-0d34-0410-b5e6-96231b3b80d8 NAKAMURA Takumi 5 years ago
2 changed file(s) with 10 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
125125 SDKROOT= \
126126 TARGET_NATIVE_ARCH="$(TARGET_NATIVE_ARCH)" \
127127 TARGETS_TO_BUILD="$(TARGETS_TO_BUILD)" \
128 TARGET_LIBS="$(LIBS)" \
128129 ENABLE_OPTIMIZED=$(ENABLE_OPTIMIZED) \
129130 ENABLE_PROFILING=$(ENABLE_PROFILING) \
130131 ENABLE_COVERAGE=$(ENABLE_COVERAGE) \
2929 SUB_CFLAGS := ${CPP.BaseFlags} ${C.Flags}
3030 SUB_CXXFLAGS := ${CPP.BaseFlags} ${CXX.Flags}
3131
32 # Override LIBS with TARGET's LIBS for cross compilation.
33 # FIXME: Host's llvm-config is not generated. It's for target's.
34 ifneq ($(TARGET_LIBS), )
35 LLVM_SYSTEM_LIBS := $(TARGET_LIBS)
36 else
37 LLVM_SYSTEM_LIBS := $(LIBS)
38 endif
39
3240 # This is blank for now. We need to be careful about adding stuff here:
3341 # LDFLAGS tend not to be portable, and we don't currently require the
3442 # user to use libtool when linking against LLVM.
5058 >> temp.sed
5159 $(Verb) $(ECHO) 's/@LLVM_BUILDMODE@/$(subst /,\/,$(BuildMode))/' \
5260 >> temp.sed
53 $(Verb) $(ECHO) 's/@LLVM_SYSTEM_LIBS@/$(subst /,\/,$(LIBS))/' \
61 $(Verb) $(ECHO) 's/@LLVM_SYSTEM_LIBS@/$(subst /,\/,$(LLVM_SYSTEM_LIBS))/' \
5462 >> temp.sed
5563 $(Verb) $(ECHO) 's/@LLVM_TARGETS_BUILT@/$(subst /,\/,$(TARGETS_TO_BUILD))/' \
5664 >> temp.sed