[llvm] [libclc] Add missing deps for LLVM_ENABLE_RUNTIMES. (PR #145684)

Harald van Dijk via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 25 05:03:37 PDT 2025


https://github.com/hvdijk created https://github.com/llvm/llvm-project/pull/145684

When libclc is built using LLVM_ENABLE_RUNTIMES, we need all tools to be available before starting the runtime build. Add the missing deps for this.

>From 0ff2f9ebbf96dd5ba8f4038df2f6f0fc0ccfa37d Mon Sep 17 00:00:00 2001
From: Harald van Dijk <harald.vandijk at codeplay.com>
Date: Wed, 25 Jun 2025 13:00:46 +0100
Subject: [PATCH] [libclc] Add missing deps for LLVM_ENABLE_RUNTIMES.

When libclc is built using LLVM_ENABLE_RUNTIMES, we need all tools to be
available before starting the runtime build. Add the missing deps for
this.
---
 llvm/runtimes/CMakeLists.txt | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/llvm/runtimes/CMakeLists.txt b/llvm/runtimes/CMakeLists.txt
index 9f86650ec58d1..b20cdb8d68ec3 100644
--- a/llvm/runtimes/CMakeLists.txt
+++ b/llvm/runtimes/CMakeLists.txt
@@ -510,6 +510,13 @@ if(build_runtimes)
   endif()
 
   # TODO: We need to consider passing it as '-DRUNTIMES_x86_64_LLVM_ENABLE_RUNTIMES'.
+  if("libclc" IN_LIST LLVM_ENABLE_RUNTIMES)
+    foreach(dep clang llvm-as llvm-link opt)
+      if(TARGET ${dep})
+        list(APPEND extra_deps ${dep})
+      endif()
+    endforeach()
+  endif()
   if("openmp" IN_LIST LLVM_ENABLE_RUNTIMES OR "offload" IN_LIST LLVM_ENABLE_RUNTIMES)
     if (${LLVM_TOOL_FLANG_BUILD})
       message(STATUS "Configuring build of omp_lib.mod and omp_lib_kinds.mod via flang")



More information about the llvm-commits mailing list