summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorEric Fiselier <eric@efcs.ca>2017-02-10 04:25:33 +0000
committerEric Fiselier <eric@efcs.ca>2017-02-10 04:25:33 +0000
commitd60b66ad4f04e7320eb926f8557cef30b3778f99 (patch)
tree7fe222d3658db44f0d245139c1c310b5e7e249ff /CMakeLists.txt
parente7bee0d9c6c9fbcf8a495ca02784f1d8752d2894 (diff)
Split exception.cpp and new.cpp implementation into different files for different runtimes.
exception.cpp is a bloody mess. It's full of confusing #ifdef branches for each different ABI library we support, and it's getting unmaintainable. This patch breaks down exception.cpp into multiple different header files, roughly one per implementation. Additionally it moves the definitions of exceptions in new.cpp into the correct implementation header. This patch also removes an unmaintained libc++abi configuration. This configuration may still be used by Apple internally but there are no other possible users. If it turns out that Apple still uses this configuration internally I will re-add it in a later commit. See http://llvm.org/PR31904. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@294707 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt8
1 files changed, 8 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0ac7c8c14..fa6669e63 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -116,11 +116,19 @@ if (LIBCXX_CXX_ABI STREQUAL "default")
${LLVM_MAIN_SRC_DIR}/runtimes/libcxxabi/include
NO_DEFAULT_PATH
)
+ find_path(
+ LIBCXX_LIBCXXABI_INCLUDES_EXTERNAL
+ cxxabi.h
+ PATHS /usr/include
+ )
if ((NOT LIBCXX_STANDALONE_BUILD OR HAVE_LIBCXXABI) AND
IS_DIRECTORY "${LIBCXX_LIBCXXABI_INCLUDES_INTERNAL}")
set(LIBCXX_CXX_ABI_LIBNAME "libcxxabi")
set(LIBCXX_CXX_ABI_INCLUDE_PATHS "${LIBCXX_LIBCXXABI_INCLUDES_INTERNAL}")
set(LIBCXX_CXX_ABI_INTREE 1)
+ elseif(APPLE AND IS_DIRECTORY "${LIBCXX_LIBCXXABI_INCLUDES_INTERNAL}")
+ set(LIBCXX_CXX_ABI_LIBNAME "libcxxabi")
+ set(LIBCXX_CXX_ABI_INCLUDE_PATHS "${LIBCXX_LIBCXXABI_INCLUDES_INTERNAL}")
else()
if (LIBCXX_TARGETING_MSVC)
# FIXME: Figure out how to configure the ABI library on Windows.