diff options
author | Ryan Prichard <rprichard@google.com> | 2023-11-03 12:54:55 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-03 12:54:55 -0700 |
commit | 76b1a7c91651b8c3516913ce9b11c05147ec46d2 (patch) | |
tree | d453b384c7e9516734080185bd6a91683c93ace1 /libcxxabi | |
parent | 32e35b21b5971cc939b1de1194145d9b934fcb54 (diff) | |
download | llvm-76b1a7c91651b8c3516913ce9b11c05147ec46d2.zip llvm-76b1a7c91651b8c3516913ce9b11c05147ec46d2.tar.gz llvm-76b1a7c91651b8c3516913ce9b11c05147ec46d2.tar.bz2 |
[libc++][Android] Explicitly declare low-level lib existence (#70534)
Android's librt and libpthread functionality is part of libc.{a,so}
instead. The atomic APIs are part of the compiler-rt builtins archive.
Android does have libdl.
Android's libc.so has `__cxa_thread_atexit_impl` starting in API 23, and
the oldest supported API is 21, so continue using feature detection for
that API.
These settings need to be declared explicitly for the sake of the fuzzer
library's custom libc++ build `add_custom_libcxx`. That macro builds
libc++ using `-DCMAKE_TRY_COMPILE_TARGET_TYPE=STATIC_LIBRARY`, which
breaks the feature detection.
Diffstat (limited to 'libcxxabi')
-rw-r--r-- | libcxxabi/cmake/config-ix.cmake | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libcxxabi/cmake/config-ix.cmake b/libcxxabi/cmake/config-ix.cmake index 702fe7d..39b9284 100644 --- a/libcxxabi/cmake/config-ix.cmake +++ b/libcxxabi/cmake/config-ix.cmake @@ -95,6 +95,11 @@ if(FUCHSIA) set(LIBCXXABI_HAS_PTHREAD_LIB NO) check_library_exists(c __cxa_thread_atexit_impl "" LIBCXXABI_HAS_CXA_THREAD_ATEXIT_IMPL) +elseif(ANDROID) + set(LIBCXXABI_HAS_DL_LIB YES) + set(LIBCXXABI_HAS_PTHREAD_LIB NO) + check_library_exists(c __cxa_thread_atexit_impl "" + LIBCXXABI_HAS_CXA_THREAD_ATEXIT_IMPL) else() check_library_exists(dl dladdr "" LIBCXXABI_HAS_DL_LIB) check_library_exists(pthread pthread_once "" LIBCXXABI_HAS_PTHREAD_LIB) |