[libcxx-commits] [libcxxabi] 26a0aeb - [libc++abi] Add builtins to dynamic library link

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Wed Feb 17 14:06:04 PST 2021


Author: Patrick Oppenlander
Date: 2021-02-17T17:05:59-05:00
New Revision: 26a0aeba61717d096e5422deff02331d93d4b00a

URL: https://github.com/llvm/llvm-project/commit/26a0aeba61717d096e5422deff02331d93d4b00a
DIFF: https://github.com/llvm/llvm-project/commit/26a0aeba61717d096e5422deff02331d93d4b00a.diff

LOG: [libc++abi] Add builtins to dynamic library link

Otherwise libc++abi.so fails to link on arm with undefined references to
some __aeabi_ builtins.

Differential Revision: https://reviews.llvm.org/D96574

Added: 
    

Modified: 
    libcxxabi/src/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/libcxxabi/src/CMakeLists.txt b/libcxxabi/src/CMakeLists.txt
index 9003f79bbed1..ff1e45705dca 100644
--- a/libcxxabi/src/CMakeLists.txt
+++ b/libcxxabi/src/CMakeLists.txt
@@ -75,6 +75,11 @@ else()
   add_library_flags_if(LIBCXXABI_HAS_C_LIB c)
 endif()
 
+if (LIBCXXABI_USE_COMPILER_RT)
+  find_compiler_rt_library(builtins LIBCXXABI_BUILTINS_LIBRARY)
+  list(APPEND LIBCXXABI_SHARED_LIBRARIES "${LIBCXXABI_BUILTINS_LIBRARY}")
+endif ()
+
 if (LIBCXXABI_USE_LLVM_UNWINDER)
   # Prefer using the in-tree version of libunwind, either shared or static. If
   # none are found fall back to using -lunwind.


        


More information about the libcxx-commits mailing list