[llvm] e41f5aa - [runtimes] Add explicit offload arch tool dependencies (#206076)

via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 15 05:09:21 PDT 2026


Author: Robert Imschweiler
Date: 2026-07-15T14:09:17+02:00
New Revision: e41f5aa4d656ed16b8f9890ee7f30fb1845d4a03

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

LOG: [runtimes] Add explicit offload arch tool dependencies (#206076)

Needed for the offload unittests which detect the target arch at
configure time if not forced by OFFLOAD_TESTS_FORCE_AMDGPU_ARCH. Bug had
been masked by the dependency on flang, which we recently removed in
https://github.com/llvm/llvm-project/pull/198205.

Claude assisted with this patch.

Added: 
    

Modified: 
    llvm/runtimes/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/llvm/runtimes/CMakeLists.txt b/llvm/runtimes/CMakeLists.txt
index 3cc98fdbd257d..2b667ad567f23 100644
--- a/llvm/runtimes/CMakeLists.txt
+++ b/llvm/runtimes/CMakeLists.txt
@@ -628,6 +628,13 @@ if(build_runtimes)
         list(APPEND extra_deps ${dep})
       endif()
     endforeach()
+    # The offload unittests detect the GPU arch at configure time via
+    # -mcpu=native.
+    if(LLVM_INCLUDE_TESTS)
+      if(TARGET offload-arch)
+        list(APPEND extra_deps offload-arch)
+      endif()
+    endif()
   endif()
   if("libsycl" IN_LIST LLVM_ENABLE_RUNTIMES)
     foreach(dep clang-linker-wrapper clang-sycl-linker clang llvm-offload-binary)


        


More information about the llvm-commits mailing list