summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorPetr Hosek <phosek@chromium.org>2018-05-22 18:33:27 +0000
committerPetr Hosek <phosek@chromium.org>2018-05-22 18:33:27 +0000
commit27fb9d81af7d510c1396fdb193f306f786f6a7df (patch)
treefc5d7bb161b9e308fa39467746df6b43c1161a96 /cmake
parent6418b4a6af48080f43e40a82cbd14600a9a75b94 (diff)
[CMake] Support libc++ as Clang default stdlib in compiler-rt
Use libc++ when selected as default Clang stdlib and avoid checking C++ compiler when using the in-tree version of libc++. This is a partial alternative to D47094 that does not rely on compiler runtime checks. Differential Revision: https://reviews.llvm.org/D47100 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@333010 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'cmake')
-rw-r--r--cmake/config-ix.cmake1
1 files changed, 1 insertions, 0 deletions
diff --git a/cmake/config-ix.cmake b/cmake/config-ix.cmake
index 8271a9686..55f693caf 100644
--- a/cmake/config-ix.cmake
+++ b/cmake/config-ix.cmake
@@ -108,6 +108,7 @@ if (ANDROID AND COMPILER_RT_HAS_LIBDL)
# Android's libstdc++ has a dependency on libdl.
list(APPEND CMAKE_REQUIRED_LIBRARIES dl)
endif()
+check_library_exists(c++ __cxa_throw "" COMPILER_RT_HAS_LIBCXX)
check_library_exists(stdc++ __cxa_throw "" COMPILER_RT_HAS_LIBSTDCXX)
# Linker flags.