termux-packages/packages/emscripten/llvm-project-compiler-rt-CM...

31 lines
1.1 KiB
Diff

--- a/compiler-rt/CMakeLists.txt
+++ b/compiler-rt/CMakeLists.txt
@@ -203,6 +203,9 @@
elseif (FUCHSIA)
set(${var}_LIBNAME "libc++")
set(${var}_INTREE 1)
+ elseif (ANDROID)
+ set(${var}_LIBNAME "libc++_shared")
+ set(${var}_SYSTEM 1)
else()
set(${var}_LIBNAME "libstdc++")
set(${var}_SYSTEM 1)
@@ -218,7 +221,7 @@
# TODO: Mark this as internal flag, most users should use COMPILER_RT_CXX_LIBRARY.
set(SANITIZER_CXX_ABI "default" CACHE STRING
"Specify C++ ABI library to use.")
-set(CXXABIS none default libstdc++ libc++ libcxxabi)
+set(CXXABIS none default libc++_shared libstdc++ libc++ libcxxabi)
set_property(CACHE SANITIZER_CXX_ABI PROPERTY STRINGS ;${CXXABIS})
handle_default_cxx_lib(SANITIZER_CXX_ABI)
@@ -639,6 +642,8 @@
list(APPEND SANITIZER_CXX_ABI_LIBRARIES "c++abi")
elseif (SANITIZER_CXX_ABI_LIBNAME STREQUAL "libstdc++")
append_list_if(COMPILER_RT_HAS_LIBSTDCXX stdc++ SANITIZER_CXX_ABI_LIBRARIES)
+elseif (SANITIZER_CXX_ABI_LIBNAME STREQUAL "libc++_shared")
+ list(APPEND SANITIZER_CXX_ABI_LIBRARIES "c++_shared")
endif()
if (SANITIZER_TEST_CXX_LIBNAME STREQUAL "libc++")