summaryrefslogtreecommitdiffstats
path: root/libcxx/cmake/Modules/HandleLibCXXABI.cmake
diff options
context:
space:
mode:
authorEric Fiselier <eric@efcs.ca>2015-07-29 21:07:28 +0000
committerEric Fiselier <eric@efcs.ca>2015-07-29 21:07:28 +0000
commitff16b9ac90dc92ebb2b3097707148930abeca2f8 (patch)
tree46bcea99d653e7ebdfc7c70433074c7c816128ae /libcxx/cmake/Modules/HandleLibCXXABI.cmake
parent4323831732292ee03686ca31a3205b0cecc8feb5 (diff)
downloadbcm5719-llvm-ff16b9ac90dc92ebb2b3097707148930abeca2f8.tar.gz
bcm5719-llvm-ff16b9ac90dc92ebb2b3097707148930abeca2f8.zip
Recommit r243503 "[libcxx] Cleanup CMake configuration and integrate with LLVM"
This change was reverted in r243550 because it broke clang-format builds (see PR24306). This patch recommits a fixed version of the original. llvm-svn: 243574
Diffstat (limited to 'libcxx/cmake/Modules/HandleLibCXXABI.cmake')
-rw-r--r--libcxx/cmake/Modules/HandleLibCXXABI.cmake15
1 files changed, 15 insertions, 0 deletions
diff --git a/libcxx/cmake/Modules/HandleLibCXXABI.cmake b/libcxx/cmake/Modules/HandleLibCXXABI.cmake
index 73723e3559b..4224882f422 100644
--- a/libcxx/cmake/Modules/HandleLibCXXABI.cmake
+++ b/libcxx/cmake/Modules/HandleLibCXXABI.cmake
@@ -58,6 +58,21 @@ macro(setup_abi_lib abidefines abilib abifiles abidirs)
endmacro()
+# Setup the default options if LIBCXX_CXX_ABI is not specified.
+if (NOT LIBCXX_CXX_ABI)
+ if (NOT DEFINED LIBCXX_BUILT_STANDALONE AND
+ IS_DIRECTORY "${CMAKE_SOURCE_DIR}/projects/libcxxabi")
+ set(LIBCXX_CXX_ABI_LIBNAME "libcxxabi")
+ set(LIBCXX_CXX_ABI_INCLUDE_PATHS "${CMAKE_SOURCE_DIR}/projects/libcxxabi/include")
+ set(LIBCXX_CXX_ABI_INTREE 1)
+ else ()
+ set(LIBCXX_CXX_ABI_LIBNAME "none")
+ endif ()
+else ()
+ set(LIBCXX_CXX_ABI_LIBNAME "${LIBCXX_CXX_ABI}")
+endif ()
+
+# Configure based on the selected ABI library.
if ("${LIBCXX_CXX_ABI_LIBNAME}" STREQUAL "libstdc++" OR
"${LIBCXX_CXX_ABI_LIBNAME}" STREQUAL "libsupc++")
set(_LIBSUPCXX_INCLUDE_FILES
OpenPOWER on IntegriCloud