[libcxx-commits] [libcxxabi] 5244ef0 - [libcxxabi] [test] Depend on unwind only if available

Michał Górny via libcxx-commits libcxx-commits at lists.llvm.org
Wed Feb 16 10:30:51 PST 2022


Author: Michał Górny
Date: 2022-02-16T19:30:25+01:00
New Revision: 5244ef0faf5595495c1adedfa16c346d35caebdf

URL: https://github.com/llvm/llvm-project/commit/5244ef0faf5595495c1adedfa16c346d35caebdf
DIFF: https://github.com/llvm/llvm-project/commit/5244ef0faf5595495c1adedfa16c346d35caebdf.diff

LOG: [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

Added: 
    

Modified: 
    libcxxabi/test/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/libcxxabi/test/CMakeLists.txt b/libcxxabi/test/CMakeLists.txt
index 6baaf40ca7b11..57b5fccab8008 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()


        


More information about the libcxx-commits mailing list