[libcxx-commits] [PATCH] D96574: libcxxabi: add builtins to dynamic library link

Patrick Oppenlander via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Feb 11 20:10:29 PST 2021


pattop created this revision.
Herald added subscribers: kristof.beyls, mgorny.
pattop requested review of this revision.
Herald added a project: libc++abi.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libc++abi.

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


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D96574

Files:
  libcxxabi/src/CMakeLists.txt


Index: libcxxabi/src/CMakeLists.txt
===================================================================
--- libcxxabi/src/CMakeLists.txt
+++ libcxxabi/src/CMakeLists.txt
@@ -75,6 +75,11 @@
   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.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D96574.323216.patch
Type: text/x-patch
Size: 594 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20210212/5f77152b/attachment.bin>


More information about the libcxx-commits mailing list