[libc-commits] [libc] [libc] Use the proper name for the 'llvm-gpu-loader' (PR #186101)

Joseph Huber via libc-commits libc-commits at lists.llvm.org
Thu Mar 12 04:49:22 PDT 2026


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

Summary:
This used to be two separate executables but was merged awhile back. The
LLVM libc code was never updated to use the new tool name and a recent
refactoring unintentionally removed the symlinks. Just look for
`llvm-gpu-loader`.


>From abe79e0828c4dcfbbef502c3d6c2d1cd7d0aec64 Mon Sep 17 00:00:00 2001
From: Joseph Huber <huberjn at outlook.com>
Date: Thu, 12 Mar 2026 06:46:37 -0500
Subject: [PATCH] [libc] Use the proper name for the 'llvm-gpu-loader'

Summary:
This used to be two separate executables but was merged awhile back. The
LLVM libc code was never updated to use the new tool name and a recent
refactoring unintentionally removed the symlinks. Just look for
`llvm-gpu-loader`.
---
 libc/cmake/modules/prepare_libc_gpu_build.cmake | 16 +++-------------
 1 file changed, 3 insertions(+), 13 deletions(-)

diff --git a/libc/cmake/modules/prepare_libc_gpu_build.cmake b/libc/cmake/modules/prepare_libc_gpu_build.cmake
index 55cd0242eedeb..fcf0e38db81af 100644
--- a/libc/cmake/modules/prepare_libc_gpu_build.cmake
+++ b/libc/cmake/modules/prepare_libc_gpu_build.cmake
@@ -70,20 +70,10 @@ set(LIBC_GPU_TARGET_ARCHITECTURE "${gpu_test_architecture}")
 set(LIBC_GPU_LOADER_EXECUTABLE "" CACHE STRING "Executable for the GPU loader.")
 if(LIBC_GPU_LOADER_EXECUTABLE)
   set(gpu_loader_executable ${LIBC_GPU_LOADER_EXECUTABLE})
-elseif(LIBC_TARGET_ARCHITECTURE_IS_AMDGPU)
-  find_program(LIBC_AMDHSA_LOADER_EXECUTABLE
-               NAMES amdhsa-loader NO_DEFAULT_PATH
-               PATHS ${LLVM_BINARY_DIR}/bin ${compiler_path})
-  if(LIBC_AMDHSA_LOADER_EXECUTABLE)
-    set(gpu_loader_executable ${LIBC_AMDHSA_LOADER_EXECUTABLE})
-  endif()
-elseif(LIBC_TARGET_ARCHITECTURE_IS_NVPTX)
-  find_program(LIBC_NVPTX_LOADER_EXECUTABLE
-               NAMES nvptx-loader NO_DEFAULT_PATH
+else()
+  find_program(gpu_loader_executable
+               NAMES llvm-gpu-loader NO_DEFAULT_PATH
                PATHS ${LLVM_BINARY_DIR}/bin ${compiler_path})
-  if(LIBC_NVPTX_LOADER_EXECUTABLE)
-    set(gpu_loader_executable ${LIBC_NVPTX_LOADER_EXECUTABLE})
-  endif()
 endif()
 if(NOT TARGET libc.utils.gpu.loader AND gpu_loader_executable)
   add_custom_target(libc.utils.gpu.loader)



More information about the libc-commits mailing list