[libc-commits] [PATCH] D155837: [libc] Add an override option for specifying the loader implementation

Joseph Huber via Phabricator via libc-commits libc-commits at lists.llvm.org
Thu Jul 20 06:45:30 PDT 2023


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGcf269417b20f: [libc] Add an override option for specifying the loader implementation (authored by jhuber6).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D155837/new/

https://reviews.llvm.org/D155837

Files:
  libc/utils/gpu/loader/CMakeLists.txt


Index: libc/utils/gpu/loader/CMakeLists.txt
===================================================================
--- libc/utils/gpu/loader/CMakeLists.txt
+++ libc/utils/gpu/loader/CMakeLists.txt
@@ -29,7 +29,15 @@
 endif()
 
 # Add a custom target to be used for testing.
-if(TARGET amdhsa_loader AND LIBC_GPU_TARGET_ARCHITECTURE_IS_AMDGPU)
+set(LIBC_GPU_LOADER_EXECUTABLE "" CACHE STRING "Overriding binary for the GPU loader.")
+if(LIBC_GPU_LOADER_EXECUTABLE)
+  add_custom_target(libc.utils.gpu.loader)
+  set_target_properties(
+    libc.utils.gpu.loader
+    PROPERTIES
+      EXECUTABLE "${LIBC_GPU_LOADER_EXECUTABLE}"
+  )
+elseif(TARGET amdhsa_loader AND LIBC_GPU_TARGET_ARCHITECTURE_IS_AMDGPU)
   add_custom_target(libc.utils.gpu.loader)
   add_dependencies(libc.utils.gpu.loader amdhsa_loader)
   set_target_properties(


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D155837.542494.patch
Type: text/x-patch
Size: 829 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20230720/eabf8760/attachment-0001.bin>


More information about the libc-commits mailing list