[PATCH] D29575: [libcxx][CMake] Support in-tree libunwind when building as part of runtimes

Petr Hosek via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 8 18:31:16 PST 2017


This revision was automatically updated to reflect the committed changes.
Closed by commit rL294553: [libcxx][CMake] Support in-tree libunwind when building as part of runtimes (authored by phosek).

Changed prior to commit:
  https://reviews.llvm.org/D29575?vs=87304&id=87748#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D29575

Files:
  libcxx/trunk/CMakeLists.txt
  libcxx/trunk/lib/CMakeLists.txt


Index: libcxx/trunk/CMakeLists.txt
===================================================================
--- libcxx/trunk/CMakeLists.txt
+++ libcxx/trunk/CMakeLists.txt
@@ -158,6 +158,7 @@
 # Build libc++abi with libunwind. We need this option to determine whether to
 # link with libunwind or libgcc_s while running the test cases.
 option(LIBCXXABI_USE_LLVM_UNWINDER "Build and use the LLVM unwinder." OFF)
+option(LIBCXXABI_ENABLE_STATIC_UNWINDER "Statically link the LLVM unwinder." OFF)
 
 # Target options --------------------------------------------------------------
 option(LIBCXX_BUILD_32_BITS "Build 32 bit libc++." ${LLVM_BUILD_32_BITS})
Index: libcxx/trunk/lib/CMakeLists.txt
===================================================================
--- libcxx/trunk/lib/CMakeLists.txt
+++ libcxx/trunk/lib/CMakeLists.txt
@@ -89,9 +89,9 @@
 
 # Add the unwinder library.
 if (LIBCXXABI_USE_LLVM_UNWINDER)
-  if (TARGET unwind_shared)
+  if (NOT LIBCXXABI_ENABLE_STATIC_UNWINDER AND (TARGET unwind_shared OR HAVE_LIBUNWIND))
     add_interface_library(unwind_shared)
-  elseif (TARGET unwind_static)
+  elseif (LIBCXXABI_ENABLE_STATIC_UNWINDER AND (TARGET unwind_static OR HAVE_LIBUNWIND))
     add_interface_library(unwind_static)
   else()
     add_interface_library(unwind)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D29575.87748.patch
Type: text/x-patch
Size: 1281 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170209/f4491c46/attachment.bin>


More information about the llvm-commits mailing list