libcxxabi-fix-link-builtins
authorLLVM Packaging Team <pkg-llvm-team@lists.alioth.debian.org>
Sun, 13 Feb 2022 13:04:40 +0000 (13:04 +0000)
committerSylvestre Ledru <sylvestre@debian.org>
Sun, 13 Feb 2022 13:04:40 +0000 (13:04 +0000)
if LIBCXXABI_USE_COMPILER_RT=ON, add builtins to libcxxabi library
flags, otherwise add libgcc following how libunwind does the same

Gbp-Pq: Name libcxxabi-fix-link-builtins.diff

libcxxabi/src/CMakeLists.txt

index a8e12aa36e6438b9f769360548dad9150adb1b9e..9b160e0913aaebcfcae3cce238ec63d1ea6b733a 100644 (file)
@@ -104,7 +104,9 @@ if (ANDROID AND ANDROID_PLATFORM_LEVEL LESS 21)
   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 ()