[llvm] [Offload] Do not link every target for JIT (PR #92013)
Shilei Tian via llvm-commits
llvm-commits at lists.llvm.org
Mon May 13 20:21:07 PDT 2024
shiltian wrote:
You could potentially do this in `offload/plugins-nextgen/common/CMakeLists.txt`:
```
foreach(Target ${TargetsSupported})
target_compile_definitions(PluginCommon PRIVATE "LIBOMPTARGET_JIT_${Target}")
llvm_map_components_to_libnames(llvm_libs ${Target})
target_link_libraries(PluginCommon INTERFACE ${llvm_libs})
endforeach()
```
In this way, there is no need for changes of each target. Technically it should have been done on `PluginCommon` since this is the CMake target that needs those symbols.
https://github.com/llvm/llvm-project/pull/92013
More information about the llvm-commits
mailing list