Skip to content

Commit e879b2b

Browse files
mgornytstellar
authored andcommitted
[libcxxabi] [test] Depend on unwind only if available
When building libcxxabi via LLVM_ENABLE_RUNTIMES=libcxxabi the CMake invocation fails because of missing "unwind" target. However, if the extraneous dependency is removed, the library builds just fine against installed libunwind and tests work fine. To fix this, add the dependency only if the target actually exists. Differential Revision: https://reviews.llvm.org/D119538 (cherry picked from commit 5244ef0)
1 parent 569b773 commit e879b2b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libcxxabi/test/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ endif()
6363

6464
if (NOT LIBCXXABI_STANDALONE_BUILD)
6565
list(APPEND LIBCXXABI_TEST_DEPS cxx)
66-
if (LIBCXXABI_USE_LLVM_UNWINDER)
66+
if (LIBCXXABI_USE_LLVM_UNWINDER AND TARGET unwind)
6767
list(APPEND LIBCXXABI_TEST_DEPS unwind)
6868
endif()
6969
endif()

0 commit comments

Comments
 (0)