From 1edf3166ef0f32f05e68e7a4150f57365221135e Mon Sep 17 00:00:00 2001 From: Eric Fiselier Date: Fri, 10 Feb 2017 08:57:35 +0000 Subject: Recommit "Split exception.cpp and new.cpp implementation into different files for different runtimes." This recommits r294707 with additional fixes. The main difference is libc++ now correctly builds without any ABI library. 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@294730 91177308-0d34-0410-b5e6-96231b3b80d8 --- cmake/Modules/HandleLibCXXABI.cmake | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'cmake/Modules') diff --git a/cmake/Modules/HandleLibCXXABI.cmake b/cmake/Modules/HandleLibCXXABI.cmake index 182565f52..b404e36c1 100644 --- a/cmake/Modules/HandleLibCXXABI.cmake +++ b/cmake/Modules/HandleLibCXXABI.cmake @@ -103,9 +103,11 @@ elseif ("${LIBCXX_CXX_ABI_LIBNAME}" STREQUAL "libcxxabi") # Assume c++abi is installed in the system, rely on -lc++abi link flag. set(CXXABI_LIBNAME "c++abi") endif() - setup_abi_lib("-DLIBCXX_BUILDING_LIBCXXABI" - ${CXXABI_LIBNAME} "cxxabi.h;__cxxabi_config.h" "" - ) + set(HEADERS "cxxabi.h;__cxxabi_config.h") + if (LIBCXX_CXX_ABI_SYSTEM) + set(HEADERS "") + endif() + setup_abi_lib("-DLIBCXX_BUILDING_LIBCXXABI" ${CXXABI_LIBNAME} "${HEADERS}" "") elseif ("${LIBCXX_CXX_ABI_LIBNAME}" STREQUAL "libcxxrt") setup_abi_lib("-DLIBCXXRT" "cxxrt" "cxxabi.h;unwind.h;unwind-arm.h;unwind-itanium.h" "" -- cgit v1.2.3