[libcxx-commits] [libcxxabi] r373770 - [libc++abi] Link against libSystem on Apple platforms
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Oct 4 11:32:46 PDT 2019
Author: ldionne
Date: Fri Oct 4 11:32:46 2019
New Revision: 373770
URL: http://llvm.org/viewvc/llvm-project?rev=373770&view=rev
Log:
[libc++abi] Link against libSystem on Apple platforms
On Apple platforms, libSystem is an umbrella for all other system
libraries, and libpthread (and friends) are actually just symlinks
to libSystem.
Modified:
libcxxabi/trunk/cmake/config-ix.cmake
libcxxabi/trunk/src/CMakeLists.txt
Modified: libcxxabi/trunk/cmake/config-ix.cmake
URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/cmake/config-ix.cmake?rev=373770&r1=373769&r2=373770&view=diff
==============================================================================
--- libcxxabi/trunk/cmake/config-ix.cmake (original)
+++ libcxxabi/trunk/cmake/config-ix.cmake Fri Oct 4 11:32:46 2019
@@ -75,3 +75,4 @@ check_library_exists(dl dladdr "" LIBCXX
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)
Modified: libcxxabi/trunk/src/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/src/CMakeLists.txt?rev=373770&r1=373769&r2=373770&view=diff
==============================================================================
--- libcxxabi/trunk/src/CMakeLists.txt (original)
+++ libcxxabi/trunk/src/CMakeLists.txt Fri Oct 4 11:32:46 2019
@@ -60,11 +60,16 @@ if (LIBCXXABI_HAS_CXA_THREAD_ATEXIT_IMPL
add_definitions(-DHAVE___CXA_THREAD_ATEXIT_IMPL)
endif()
-if (LIBCXXABI_ENABLE_THREADS)
- add_library_flags_if(LIBCXXABI_HAS_PTHREAD_LIB pthread)
+if (APPLE)
+ add_library_flags_if(LIBCXXABI_HAS_SYSTEM_LIB System)
+else()
+ if (LIBCXXABI_ENABLE_THREADS)
+ add_library_flags_if(LIBCXXABI_HAS_PTHREAD_LIB pthread)
+ endif()
+
+ add_library_flags_if(LIBCXXABI_HAS_C_LIB c)
endif()
-add_library_flags_if(LIBCXXABI_HAS_C_LIB c)
if (LIBCXXABI_USE_LLVM_UNWINDER)
# Prefer using the in-tree version of libunwind, either shared or static. If
# none are found fall back to using -lunwind.
More information about the libcxx-commits
mailing list