Skip to content

[offload] - Fix issue with standalone debug offload build #104647

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions offload/plugins-nextgen/common/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,15 @@ add_dependencies(PluginCommon intrinsics_gen)

# Only enable JIT for those targets that LLVM can support.
set(supported_jit_targets AMDGPU NVPTX)
foreach(target IN LISTS supported_jit_targets)
if("${target}" IN_LIST LLVM_TARGETS_TO_BUILD)
target_compile_definitions(PluginCommon PRIVATE "LIBOMPTARGET_JIT_${target}")
llvm_map_components_to_libnames(llvm_libs ${target})
target_link_libraries(PluginCommon PRIVATE ${llvm_libs})
endif()
endforeach()
if (NOT LLVM_LINK_LLVM_DYLIB)
foreach(target IN LISTS supported_jit_targets)
if("${target}" IN_LIST LLVM_TARGETS_TO_BUILD)
target_compile_definitions(PluginCommon PRIVATE "LIBOMPTARGET_JIT_${target}")
llvm_map_components_to_libnames(llvm_libs ${target})
target_link_libraries(PluginCommon PRIVATE ${llvm_libs})
endif()
endforeach()
endif()

# Include the RPC server from the `libc` project if availible.
if(TARGET llvmlibc_rpc_server AND ${LIBOMPTARGET_GPU_LIBC_SUPPORT})
Expand Down
Loading