diff options
author | Andrew Wilkins <axwalk@gmail.com> | 2016-01-07 00:18:56 +0000 |
---|---|---|
committer | Andrew Wilkins <axwalk@gmail.com> | 2016-01-07 00:18:56 +0000 |
commit | 5ae84fec4c441622cbc6f27280b61996d9b14e16 (patch) | |
tree | b6f423bcec0da6540d16ec8c6830627da38d4de3 /llvm/tools/llvm-config/CMakeLists.txt | |
parent | 69b18f4703815db33a21509f2f38e3e151b80607 (diff) | |
download | bcm5719-llvm-5ae84fec4c441622cbc6f27280b61996d9b14e16.tar.gz bcm5719-llvm-5ae84fec4c441622cbc6f27280b61996d9b14e16.zip |
tools/llvm-config: improve shared library support
Summary:
r252532 added support for reporting the monolithic library
when LLVM_BUILD_LLVM_DYLIB is used. This would only be done
if the individual components were not found, and the dynamic
library is found.
This diff extends this as follows:
- If LLVM_LINK_LLVM_DYLIB is set, then prefer the shared
library, even if all component libraries exist.
- Two flags, --link-shared and --link-static are introduced
to provide explicit guidance. If --link-shared is passed
and the shared library does not exist, an error results.
Additionally, changed the expected shared library names from
(e.g.) LLVM-3.8.0 to LLVM-3.8. The former exists only in an
installation (and then only in CMake builds I think?), and not
in the build tree; this breaks usage of llvm-config during
builds, e.g. by llvm-go.
Reviewers: DiamondLovesYou, beanz
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D15033
llvm-svn: 257003
Diffstat (limited to 'llvm/tools/llvm-config/CMakeLists.txt')
-rw-r--r-- | llvm/tools/llvm-config/CMakeLists.txt | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/tools/llvm-config/CMakeLists.txt b/llvm/tools/llvm-config/CMakeLists.txt index 83794bb3fdd..46f97e53679 100644 --- a/llvm/tools/llvm-config/CMakeLists.txt +++ b/llvm/tools/llvm-config/CMakeLists.txt @@ -26,6 +26,7 @@ set(LLVM_CFLAGS "${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_${uppercase_CMAKE_BUILD_TYPE}} set(LLVM_CXXFLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_${uppercase_CMAKE_BUILD_TYPE}} ${COMPILE_FLAGS} ${LLVM_DEFINITIONS}") set(LLVM_BUILD_SYSTEM cmake) set(LLVM_HAS_RTTI ${LLVM_CONFIG_HAS_RTTI}) +set(LLVM_DYLIB_VERSION "${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}${LLVM_VERSION_SUFFIX}") # Use the C++ link flags, since they should be a superset of C link flags. set(LLVM_LDFLAGS "${CMAKE_CXX_LINK_FLAGS}") |