summaryrefslogtreecommitdiff
path: root/tools/llvm-config
diff options
context:
space:
mode:
authorReid Kleckner <reid@kleckner.net>2014-04-25 01:44:20 +0000
committerReid Kleckner <reid@kleckner.net>2014-04-25 01:44:20 +0000
commitb33022e1da567d52163b1b621f5746d10814232c (patch)
tree7379ba20f1b71df5d308a4a7f8a0797c80b2392c /tools/llvm-config
parent6715d6ec2eeaebd160bdc598c52ffa95c51a82ac (diff)
Change llvm-config --ldflags to report ${CMAKE_CXX_LINK_FLAGS}
Should fix PR19526. When Oscar added this code in the intial CMake build system port, he had a TODO saying that ${CMAKE_SHARED_LINKER_FLAGS} was probably wrong. I agree. I'm using ${CMAKE_CXX_LINK_FLAGS} to point LLVM at my custom installation of gcc 4.recent, so that seems more correct. With this change, I can build creduce against an installed clang, and it picks up the write flags from --ldflags. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207171 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-config')
-rw-r--r--tools/llvm-config/CMakeLists.txt3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/llvm-config/CMakeLists.txt b/tools/llvm-config/CMakeLists.txt
index 6f29a828f51..8d8376271de 100644
--- a/tools/llvm-config/CMakeLists.txt
+++ b/tools/llvm-config/CMakeLists.txt
@@ -16,7 +16,8 @@ set(LLVM_OBJ_ROOT ${LLVM_BINARY_DIR})
set(LLVM_CPPFLAGS "${CMAKE_CPP_FLAGS} ${CMAKE_CPP_FLAGS_${uppercase_CMAKE_BUILD_TYPE}} ${LLVM_DEFINITIONS}")
set(LLVM_CFLAGS "${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_${uppercase_CMAKE_BUILD_TYPE}} ${LLVM_DEFINITIONS}")
set(LLVM_CXXFLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_${uppercase_CMAKE_BUILD_TYPE}} ${LLVM_DEFINITIONS}")
-set(LLVM_LDFLAGS ${CMAKE_SHARED_LINKER_FLAGS})
+# Use the C++ link flags, since they should be a superset of C link flags.
+set(LLVM_LDFLAGS "${CMAKE_CXX_LINK_FLAGS}")
set(LLVM_BUILDMODE ${CMAKE_BUILD_TYPE})
set(LLVM_SYSTEM_LIBS ${SYSTEM_LIBS})
string(REPLACE ";" " " LLVM_TARGETS_BUILT "${LLVM_TARGETS_TO_BUILD}")