llvm-toolchain/debian/patches/libcxxabi-fix-link-builtins.diff
Erik Maciejewski a1ea41e97f fix an issue where builtins were not being linked into libcxxabi
if LIBCXXABI_USE_COMPILER_RT=ON, add builtins to libcxxabi library
flags, otherwise add libgcc following how libunwind does the same
2021-10-19 13:42:03 -07:00

17 lines
697 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-12_12.0.1/libcxxabi/src/CMakeLists.txt
===================================================================
--- llvm-toolchain-12_12.0.1.orig/libcxxabi/src/CMakeLists.txt
+++ llvm-toolchain-12_12.0.1/libcxxabi/src/CMakeLists.txt
@@ -104,7 +104,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 ()