llvm-toolchain/debian/patches/libcxx/libcxxabi-fix-link-builtins.diff
2022-10-07 16:08:44 +02:00

18 lines
796 B
Diff

if LIBCXXABI_USE_COMPILER_RT=ON, add builtins to libcxxabi library
flags, otherwise add libgcc following how libunwind does the same
Index: llvm-toolchain-snapshot_14~++20211114120952+5b4bfd8c2415/libcxxabi/src/CMakeLists.txt
===================================================================
--- llvm-toolchain-snapshot_14~++20211114120952+5b4bfd8c2415.orig/libcxxabi/src/CMakeLists.txt
+++ llvm-toolchain-snapshot_14~++20211114120952+5b4bfd8c2415/libcxxabi/src/CMakeLists.txt
@@ -111,7 +111,9 @@ if (ANDROID AND ANDROID_PLATFORM_LEVEL L
list(APPEND LIBCXXABI_LIBRARIES android_support)
endif()
-if (NOT LIBCXXABI_USE_COMPILER_RT)
+if (LIBCXXABI_USE_COMPILER_RT)
+ add_library_flags("${LIBCXXABI_BUILTINS_LIBRARY}")
+else()
add_library_flags_if(LIBCXXABI_HAS_GCC_LIB gcc)
endif ()