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

Vitaly Buka via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 9 19:45:35 PDT 2024


https://github.com/vitalybuka updated https://github.com/llvm/llvm-project/pull/98266

>From c0bccacdd5e9bb76199739c08e4773e287b7322a Mon Sep 17 00:00:00 2001
From: Vitaly Buka <vitalybuka at google.com>
Date: Tue, 9 Jul 2024 19:39:53 -0700
Subject: [PATCH 1/2] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?=
 =?UTF-8?q?itial=20version?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Created using spr 1.3.4
---
 llvm/runtimes/CMakeLists.txt | 49 ++++++++++++++++++++----------------
 1 file changed, 28 insertions(+), 21 deletions(-)

diff --git a/llvm/runtimes/CMakeLists.txt b/llvm/runtimes/CMakeLists.txt
index 52e9519394742..78734bbeb2a2a 100644
--- a/llvm/runtimes/CMakeLists.txt
+++ b/llvm/runtimes/CMakeLists.txt
@@ -444,6 +444,32 @@ if(build_runtimes)
   set(extra_deps "")
   set(extra_cmake_args "")
 
+  if(LLVM_INCLUDE_TESTS)
+    foreach(dep FileCheck
+                count
+                lli
+                llvm-cov
+                llvm-lto
+                llvm-jitlink
+                llvm-nm
+                llvm-objdump
+                llvm-profdata
+                llvm-size
+                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 +638,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()

>From 9c19f3f432baf38a4895e16c83093be3e3ea74c4 Mon Sep 17 00:00:00 2001
From: Vitaly Buka <vitalybuka at google.com>
Date: Tue, 9 Jul 2024 19:45:26 -0700
Subject: [PATCH 2/2] clang, lld, symbolizer

Created using spr 1.3.4
---
 llvm/runtimes/CMakeLists.txt | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/llvm/runtimes/CMakeLists.txt b/llvm/runtimes/CMakeLists.txt
index 78734bbeb2a2a..f2c273b0b9050 100644
--- a/llvm/runtimes/CMakeLists.txt
+++ b/llvm/runtimes/CMakeLists.txt
@@ -446,7 +446,9 @@ if(build_runtimes)
 
   if(LLVM_INCLUDE_TESTS)
     foreach(dep FileCheck
+                clang
                 count
+                lld
                 lli
                 llvm-cov
                 llvm-lto
@@ -455,6 +457,7 @@ if(build_runtimes)
                 llvm-objdump
                 llvm-profdata
                 llvm-size
+                llvm-symbolizer
                 llvm-xray
                 not
                 obj2yaml



More information about the llvm-commits mailing list