Skip to content
Merged
Show file tree
Hide file tree
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
1 change: 0 additions & 1 deletion offload/plugins-nextgen/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ add_subdirectory(common)
function(add_target_library target_name lib_name)
add_llvm_library(${target_name} STATIC
LINK_COMPONENTS
${LLVM_TARGETS_TO_BUILD}
AggressiveInstCombine
Analysis
BinaryFormat
Expand Down
10 changes: 7 additions & 3 deletions offload/plugins-nextgen/common/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,13 @@ add_library(PluginCommon OBJECT
add_dependencies(PluginCommon intrinsics_gen)

# Only enable JIT for those targets that LLVM can support.
string(TOUPPER "${LLVM_TARGETS_TO_BUILD}" TargetsSupported)
foreach(Target ${TargetsSupported})
target_compile_definitions(PluginCommon PRIVATE "LIBOMPTARGET_JIT_${Target}")
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()

# Include the RPC server from the `libc` project if availible.
Expand Down