[CMake] Differentiate between static and shared libc++abi
authorPetr Hosek <phosek@chromium.org>
Wed, 3 Apr 2019 01:33:14 +0000 (01:33 +0000)
committerPetr Hosek <phosek@chromium.org>
Wed, 3 Apr 2019 01:33:14 +0000 (01:33 +0000)
commit30d9af1b247ee3c0a3ea66e1f14a21eb1268b169
treeafff6424a4f042394a3798e8f23602e5d2598826
parentcad96c498c5027060c066a76475d17dfcca77024
[CMake] Differentiate between static and shared libc++abi

This addresses the issue introduced in r354212 which broke the case when
static libc++abi is merged into static libc++, but shared libc++ is
linked against shared libc++. There are 4 different possible
combinations which is difficult to capture using a single variable. This
change splits LIBCXX_CXX_ABI_LIBRARY into two:
LIBCXX_CXX_SHARED_ABI_LIBRARY and LIBCXX_CXX_STATIC_ABI_LIBRARY to
handle the shared and static cases. This in turn allows simplification
of some of the logic around merging of static archives.

Differential Revision: https://reviews.llvm.org/D60114

llvm-svn: 357556
libcxx/cmake/Modules/HandleLibCXXABI.cmake
libcxx/lib/CMakeLists.txt