[libcxx-commits] [PATCH] D119538: [libcxxabi] [test] Depend on unwind only if available

Michał Górny via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri Feb 11 03:51:36 PST 2022


mgorny created this revision.
mgorny added a reviewer: ldionne.
mgorny requested review of this revision.

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.


https://reviews.llvm.org/D119538

Files:
  libcxxabi/test/CMakeLists.txt


Index: libcxxabi/test/CMakeLists.txt
===================================================================
--- libcxxabi/test/CMakeLists.txt
+++ libcxxabi/test/CMakeLists.txt
@@ -63,7 +63,7 @@
 
 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()


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D119538.407833.patch
Type: text/x-patch
Size: 425 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20220211/e4009fff/attachment.bin>


More information about the libcxx-commits mailing list