[libcxxabi] r283699 - [libc++abi] Fix bug which cased the static libunwind to always be chosen
Eric Fiselier via cfe-commits
cfe-commits at lists.llvm.org
Sun Oct 9 13:44:48 PDT 2016
Author: ericwf
Date: Sun Oct 9 15:44:48 2016
New Revision: 283699
URL: http://llvm.org/viewvc/llvm-project?rev=283699&view=rev
Log:
[libc++abi] Fix bug which cased the static libunwind to always be chosen
Modified:
libcxxabi/trunk/src/CMakeLists.txt
Modified: libcxxabi/trunk/src/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/src/CMakeLists.txt?rev=283699&r1=283698&r2=283699&view=diff
==============================================================================
--- libcxxabi/trunk/src/CMakeLists.txt (original)
+++ libcxxabi/trunk/src/CMakeLists.txt Sun Oct 9 15:44:48 2016
@@ -54,14 +54,14 @@ if (LIBCXXABI_ENABLE_THREADS)
endif()
append_if(libraries LIBCXXABI_HAS_C_LIB c)
-
if (LIBCXXABI_USE_LLVM_UNWINDER)
- if (NOT LIBCXXABI_STANDALONE_BUILD)
- if (LIBUNWIND_ENABLE_SHARED)
- list(APPEND libraries unwind_shared)
- else()
- list(APPEND libraries unwind_static)
- endif()
+ # Prefer using the in-tree version of libunwind, either shared or static. If
+ # none are found fall back to using -lunwind.
+ # FIXME: Is it correct to prefer the static version of libunwind?
+ if (TARGET unwind_shared)
+ list(APPEND libraries unwind_shared)
+ elseif(TARGET unwind_static)
+ list(APPEND libraries unwind_static)
else()
list(APPEND libraries unwind)
endif()
More information about the cfe-commits
mailing list