From 2557f2e74da5976835d2b51cd684441b5acafd99 Mon Sep 17 00:00:00 2001 From: LLVM Packaging Team Date: Wed, 30 Oct 2024 21:56:13 +0100 Subject: [PATCH] libcxxabi-fix-link-builtins 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 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libcxxabi/src/CMakeLists.txt b/libcxxabi/src/CMakeLists.txt index f95a8c471f..a8d216bd0c 100644 --- a/libcxxabi/src/CMakeLists.txt +++ b/libcxxabi/src/CMakeLists.txt @@ -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) -- 2.30.2