[llvm] [LLVM] Use complete runtime dependency list for multilibs (PR #226580)

Joseph Huber via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 25 13:11:50 PDT 2026


https://github.com/jhuber6 created https://github.com/llvm/llvm-project/pull/226580

Summary:
The current handling makes the multilib job depend on the base runtimes
job. This means that we will potentially depend on things that don't
necessarily need to be built to fulfil the multilibs job. Instead, just
depend on the individual targets for that multilib.


>From 1c8ef375d14c684b7c2526645a8ab7f9dbaf3556 Mon Sep 17 00:00:00 2001
From: Joseph Huber <huberjn at outlook.com>
Date: Fri, 25 Sep 2026 15:05:36 -0500
Subject: [PATCH] [LLVM] Use complete runtime dependency list for multilibs

Summary:
The current handling makes the multilib job depend on the base runtimes
job. This means that we will potentially depend on things that don't
necessarily need to be built to fulfil the multilibs job. Instead, just
depend on the individual targets for that multilib.
---
 llvm/runtimes/CMakeLists.txt | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/llvm/runtimes/CMakeLists.txt b/llvm/runtimes/CMakeLists.txt
index f909457c60dca..d9b01f692ecb2 100644
--- a/llvm/runtimes/CMakeLists.txt
+++ b/llvm/runtimes/CMakeLists.txt
@@ -394,10 +394,12 @@ function(runtime_register_target name)
     endif()
   endforeach()
 
+  set(${name}_runtime_targets)
   foreach(runtime_name ${runtime_names})
     set(${runtime_name}-${name} ${runtime_name})
     set(install-${runtime_name}-${name} install-${runtime_name})
     set(install-${runtime_name}-${name}-stripped install-${runtime_name}-stripped)
+    list(APPEND ${name}_runtime_targets ${runtime_name}-${name})
     list(APPEND ${name}_extra_targets ${runtime_name}-${name} install-${runtime_name}-${name} install-${runtime_name}-${name}-stripped)
     if(LLVM_INCLUDE_TESTS)
       set(check-${runtime_name}-${name} check-${runtime_name} )
@@ -530,6 +532,7 @@ function(runtime_register_target name)
   endforeach()
 
   add_flang_mod_deps(runtimes-${name}-build ${${name}_extra_targets})
+  set(${name}_runtime_targets ${${name}_runtime_targets} PARENT_SCOPE)
 endfunction()
 
 # Check if we have any runtimes to build.
@@ -763,7 +766,7 @@ if(build_runtimes)
     foreach(multilib ${LLVM_RUNTIME_MULTILIBS})
       foreach(name ${LLVM_RUNTIME_MULTILIB_${multilib}_TARGETS})
         runtime_register_target(${name}+${multilib}
-          DEPENDS runtimes-${name}
+          DEPENDS ${${name}_runtime_targets}
           CMAKE_ARGS -DLLVM_DEFAULT_TARGET_TRIPLE=${name}
                      -DLLVM_RUNTIMES_LIBDIR_SUBDIR=${multilib}
                      ${extra_cmake_args}



More information about the llvm-commits mailing list