[llvm] libclc: Pass LLVM_NATIVE_TOOL_DIR to runtime builds (PR #196498)

Wenju He via llvm-commits llvm-commits at lists.llvm.org
Fri May 8 18:38:27 PDT 2026


================
@@ -581,6 +582,12 @@ if(build_runtimes)
         list(APPEND extra_deps ${dep})
       endif()
     endforeach()
+    if (LLVM_NATIVE_TOOL_DIR)
+      list(APPEND extra_cmake_args "-DLLVM_NATIVE_TOOL_DIR=${LLVM_NATIVE_TOOL_DIR}")
+    else()
+      # Pass the location of LLVM tools to the runtime build so libclc can find them
----------------
wenju-he wrote:

move the comment above line 585?

extra_cmake_args is shared by all runtimes in per-target build. So LLVM_NATIVE_TOOL_DIR is also passed to other runtimes. But this should be fine since it is only used in get_host_tool_path.

https://github.com/llvm/llvm-project/pull/196498


More information about the llvm-commits mailing list