[PATCH] D23289: [libcxxabi] Depend directly on unwind when not building standalone

Petr Hosek via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 8 18:29:42 PDT 2016


phosek created this revision.
phosek added reviewers: EricWF, compnerd.
phosek added a subscriber: llvm-commits.

When using libunwind and not building as standalone project, we can directly depend on the unwind library target.

https://reviews.llvm.org/D23289

Files:
  src/CMakeLists.txt

Index: src/CMakeLists.txt
===================================================================
--- src/CMakeLists.txt
+++ src/CMakeLists.txt
@@ -56,9 +56,14 @@
 
 if (LIBCXXABI_USE_LLVM_UNWINDER)
   if (NOT LIBCXXABI_BUILT_STANDALONE)
-    link_directories(${LLVM_LIBRARY_DIR})
+    if (LIBUNWIND_ENABLE_SHARED)
+      list(APPEND libraries unwind_shared)
+    else()
+      list(APPEND libraries unwind_static)
+    endif()
+  else()
+    list(APPEND libraries unwind)
   endif()
-  list(APPEND libraries unwind)
 else()
   append_if(libraries LIBCXXABI_HAS_GCC_S_LIB gcc_s)
 endif()


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D23289.67271.patch
Type: text/x-patch
Size: 584 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160809/921251a5/attachment.bin>


More information about the llvm-commits mailing list