[llvm] [Offload] Do not link every target for JIT (PR #92013)

Joseph Huber via llvm-commits llvm-commits at lists.llvm.org
Mon May 13 13:33:08 PDT 2024


================
@@ -28,7 +28,11 @@ if(NOT (CMAKE_SYSTEM_PROCESSOR MATCHES "(x86_64)|(ppc64le)|(aarch64)$" AND CMAKE
 endif()
 
 # Create the library and add the default arguments.
-add_target_library(omptarget.rtl.amdgpu AMDGPU)
+if("AMDGPU" IN_LIST LLVM_TARGETS_TO_BUILD)
----------------
jhuber6 wrote:

Honestly we should probably rename the `amdgpu` plugin to `hsa` anyway? Since the important distinction is the runtime, not the target architecture. Potentially in the future we'll have things like OpenCL or Vulkan I guess? Which are supposed to be generic in their own right.
So, what we could do is just `target_library(libomptarget.amdgpu AMDGPU)` or something, but I think that might require something else.

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


More information about the llvm-commits mailing list