summaryrefslogtreecommitdiff
path: root/libcxxabi/cmake
diff options
context:
space:
mode:
authorPetr Hosek <phosek@google.com>2019-12-06 11:11:31 -0800
committerPetr Hosek <phosek@google.com>2019-12-06 11:15:15 -0800
commit1aa17023819216dae77c7798510f178dae07a57f (patch)
treebaade7a0d95e90973b12099449c2fd6926f36bec /libcxxabi/cmake
parentc7faa6814248cf2443cce856a74247fc70699f98 (diff)
downloadllvm-1aa17023819216dae77c7798510f178dae07a57f.tar.gz
[libcxx{,abi}] Don't link libpthread and libdl on Fuchsia
These are a part of the libc so linking these explicitly isn't necessary and embedding these as deplibs causes link time error. This issues was introduced in a9b5fff which changed how we emit deplibs. Differential Revision: https://reviews.llvm.org/D71135
Diffstat (limited to 'libcxxabi/cmake')
-rw-r--r--libcxxabi/cmake/config-ix.cmake18
1 files changed, 13 insertions, 5 deletions
diff --git a/libcxxabi/cmake/config-ix.cmake b/libcxxabi/cmake/config-ix.cmake
index 496ed3463755..8892964ad376 100644
--- a/libcxxabi/cmake/config-ix.cmake
+++ b/libcxxabi/cmake/config-ix.cmake
@@ -71,8 +71,16 @@ endif()
check_cxx_compiler_flag(-nostdinc++ LIBCXXABI_HAS_NOSTDINCXX_FLAG)
# Check libraries
-check_library_exists(dl dladdr "" LIBCXXABI_HAS_DL_LIB)
-check_library_exists(pthread pthread_once "" LIBCXXABI_HAS_PTHREAD_LIB)
-check_library_exists(c __cxa_thread_atexit_impl ""
- LIBCXXABI_HAS_CXA_THREAD_ATEXIT_IMPL)
-check_library_exists(System write "" LIBCXXABI_HAS_SYSTEM_LIB)
+if(FUCHSIA)
+ set(LIBCXXABI_HAS_DL_LIB NO)
+ set(LIBCXXABI_HAS_PTHREAD_LIB NO)
+ check_library_exists(c __cxa_thread_atexit_impl ""
+ LIBCXXABI_HAS_CXA_THREAD_ATEXIT_IMPL)
+ set(LIBCXXABI_HAS_SYSTEM_LIB NO)
+else()
+ check_library_exists(dl dladdr "" LIBCXXABI_HAS_DL_LIB)
+ check_library_exists(pthread pthread_once "" LIBCXXABI_HAS_PTHREAD_LIB)
+ check_library_exists(c __cxa_thread_atexit_impl ""
+ LIBCXXABI_HAS_CXA_THREAD_ATEXIT_IMPL)
+ check_library_exists(System write "" LIBCXXABI_HAS_SYSTEM_LIB)
+endif()