[PATCH] D25413: [libcxx] Use libunwind instead of libgcc_s if libcxxabi uses it

Petr Hosek via llvm-commits llvm-commits at lists.llvm.org
Sun Oct 9 15:05:47 PDT 2016


phosek created this revision.
phosek added a subscriber: llvm-commits.
phosek set the repository for this revision to rL LLVM.
Herald added subscribers: mgorny, beanz.

When libcxxabi is configured to use LLVM unwinder, we should use it instead of always using libgcc_s.


Repository:
  rL LLVM

https://reviews.llvm.org/D25413

Files:
  lib/CMakeLists.txt


Index: lib/CMakeLists.txt
===================================================================
--- lib/CMakeLists.txt
+++ lib/CMakeLists.txt
@@ -72,9 +72,14 @@
 add_library_flags_if(LIBCXX_HAS_C_LIB c)
 add_library_flags_if(LIBCXX_HAS_M_LIB m)
 add_library_flags_if(LIBCXX_HAS_RT_LIB rt)
-add_library_flags_if(LIBCXX_HAS_GCC_S_LIB gcc_s)
 add_library_flags_if(LIBCXX_HAVE_CXX_ATOMICS_WITH_LIB atomic)
 
+if (LIBCXXABI_USE_LLVM_UNWINDER)
+  add_library_flags(unwind)
+else()
+  add_library_flags_if(LIBCXX_HAS_GCC_S_LIB gcc_s)
+endif()
+
 # Setup flags.
 if (NOT WIN32)
   add_flags_if_supported(-fPIC)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D25413.74084.patch
Type: text/x-patch
Size: 601 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161009/7e935030/attachment.bin>


More information about the llvm-commits mailing list