diff options
author | Michał Górny <mgorny@moritz.systems> | 2022-02-11 12:48:31 +0100 |
---|---|---|
committer | Tom Stellard <tstellar@redhat.com> | 2022-03-08 21:33:47 -0800 |
commit | e879b2bf82ef2d096d2c0e5147ebac541a7b8828 (patch) | |
tree | c2681f96a924fd34b351d4c429768aeb1ed83a72 | |
parent | 569b773323a3a1c174ae794741c7e1191f8deefc (diff) |
[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 5244ef0faf5595495c1adedfa16c346d35caebdf)
-rw-r--r-- | libcxxabi/test/CMakeLists.txt | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libcxxabi/test/CMakeLists.txt b/libcxxabi/test/CMakeLists.txt index 6baaf40ca7b1..57b5fccab800 100644 --- a/libcxxabi/test/CMakeLists.txt +++ b/libcxxabi/test/CMakeLists.txt @@ -63,7 +63,7 @@ endif() if (NOT LIBCXXABI_STANDALONE_BUILD) list(APPEND LIBCXXABI_TEST_DEPS cxx) - if (LIBCXXABI_USE_LLVM_UNWINDER) + if (LIBCXXABI_USE_LLVM_UNWINDER AND TARGET unwind) list(APPEND LIBCXXABI_TEST_DEPS unwind) endif() endif() |