diff options
author | Michal Gorny <mgorny@gentoo.org> | 2016-10-08 10:27:45 +0000 |
---|---|---|
committer | Michal Gorny <mgorny@gentoo.org> | 2016-10-08 10:27:45 +0000 |
commit | ffac2247af264345d79647985fd248014d868cad (patch) | |
tree | cf44856a6f7a6f27b8f023e126fcd52603e33236 /CMakeLists.txt | |
parent | cedbdd7feef9f8b644a62af246a0dd8fe7bae8d5 (diff) |
[cmake] Split linked libraries into private & public, for linker script
Introduce LIBCXX_LIBRARIES_PUBLIC in addition to LIBCXX_LIBRARIES that
holds 'public' interface libraries -- that is, libraries that both
libc++ links to and programs linked against it need to link to.
Currently this includes the ABI library and optionally -lunwind (when
LIBCXXABI_USE_LLVM_UNWINDER is on). The libraries are included in the
linker script, in order to make it possible to link C++ programs using
clang with compiler-rt runtime out-of-the-box.
Differential Revision: https://reviews.llvm.org/D25008
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@283659 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 2cf5ced11..b7e36334e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -270,9 +270,13 @@ set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${LIBCXX_LIBRARY_DIR}) # LIBCXX_CXX_FLAGS: General flags for both the compiler and linker. # LIBCXX_COMPILE_FLAGS: Compile only flags. # LIBCXX_LINK_FLAGS: Linker only flags. +# LIBCXX_LIBRARIES: Private libraries libc++ is linked to. +# LIBCXX_LIBRARIES_PUBLIC: Public libraries libc++ is linked to, +# also exposed in the linker script. set(LIBCXX_COMPILE_FLAGS "") set(LIBCXX_LINK_FLAGS "") set(LIBCXX_LIBRARIES "") +set(LIBCXX_LIBRARIES_PUBLIC "") # Include macros for adding and removing libc++ flags. include(HandleLibcxxFlags) |