[libc++abi] Fix bug which cased the static libunwind to always be chosen

llvm-svn: 283699
This commit is contained in:
Eric Fiselier 2016-10-09 20:44:48 +00:00
parent 0d42e158b1
commit fc1b0d5c24

View File

@ -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()