[llvm] e4b1813 - Fix deps for clean "ninja check-compiler-rt" (#98266)

via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 10 13:03:25 PDT 2024


Author: Vitaly Buka
Date: 2024-07-10T13:03:22-07:00
New Revision: e4b1813bb85d2efe76c2d69781a8dab0698c823b

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

LOG: Fix deps for clean "ninja check-compiler-rt" (#98266)

Without the patch even FileCheck is missing.

Added: 
    

Modified: 
    llvm/runtimes/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/llvm/runtimes/CMakeLists.txt b/llvm/runtimes/CMakeLists.txt
index 52e9519394742..f2c273b0b9050 100644
--- a/llvm/runtimes/CMakeLists.txt
+++ b/llvm/runtimes/CMakeLists.txt
@@ -444,6 +444,35 @@ if(build_runtimes)
   set(extra_deps "")
   set(extra_cmake_args "")
 
+  if(LLVM_INCLUDE_TESTS)
+    foreach(dep FileCheck
+                clang
+                count
+                lld
+                lli
+                llvm-cov
+                llvm-lto
+                llvm-jitlink
+                llvm-nm
+                llvm-objdump
+                llvm-profdata
+                llvm-size
+                llvm-symbolizer
+                llvm-xray
+                not
+                obj2yaml
+                opt
+                sancov
+                sanstats
+                llvm_gtest_main
+                llvm_gtest
+                split-file)
+      if(TARGET ${dep})
+        list(APPEND extra_deps ${dep})
+      endif()
+    endforeach()
+  endif()
+
   # Forward user-provived system configuration to runtimes for requirement introspection.
   # CMAKE_PREFIX_PATH is the search path for CMake packages.
   if(CMAKE_PREFIX_PATH)
@@ -612,29 +641,10 @@ if(build_runtimes)
   if(LLVM_INCLUDE_TESTS)
     set_property(GLOBAL APPEND PROPERTY LLVM_ALL_ADDITIONAL_TEST_DEPENDS runtimes-test-depends)
 
-    set(RUNTIMES_TEST_DEPENDS
-        FileCheck
-        count
-        llvm-cov
-        llvm-lto
-        llvm-nm
-        llvm-objdump
-        llvm-profdata
-        llvm-size
-        llvm-xray
-        not
-        obj2yaml
-        opt
-        sancov
-        sanstats
-        llvm_gtest_main
-        llvm_gtest
-        split-file
-      )
     foreach(target ${test_targets} ${SUB_CHECK_TARGETS})
-      add_dependencies(${target} ${RUNTIMES_TEST_DEPENDS})
+      add_dependencies(${target} ${extra_deps})
     endforeach()
 
-    set_property(GLOBAL APPEND PROPERTY LLVM_ALL_ADDITIONAL_TEST_TARGETS runtimes ${RUNTIMES_TEST_DEPENDS})
+    set_property(GLOBAL APPEND PROPERTY LLVM_ALL_ADDITIONAL_TEST_TARGETS runtimes ${extra_deps})
   endif()
 endif()


        


More information about the llvm-commits mailing list