libcxxabi-fix-link-builtins
authorLLVM Packaging Team <pkg-llvm-team@lists.alioth.debian.org>
Wed, 4 Dec 2024 12:11:08 +0000 (13:11 +0100)
committerSylvestre Ledru <sylvestre@debian.org>
Wed, 4 Dec 2024 12:11:08 +0000 (13:11 +0100)
if LIBCXXABI_USE_COMPILER_RT=ON, add builtins to libcxxabi library
flags, otherwise add libgcc following how libunwind does the same

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

libcxxabi/src/CMakeLists.txt

index 1e06b8cbf084d9dedd8fc49fea46017e1f2e37a2..e11df752a18692c82ea48afa36aac6e87acd77b9 100644 (file)
@@ -75,7 +75,9 @@ if (NOT APPLE) # On Apple platforms, we always use -nostdlib++ so we don't need
   add_library_flags_if(LIBCXXABI_HAS_C_LIB c)
 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()
 if (NOT LIBCXXABI_USE_LLVM_UNWINDER)