[OpenMP] FIx omp_lib.mod compilation for the GPU (#201377)
This commit is contained in:
parent
5816ef1560
commit
aa8e38f4f8
1 changed files with 6 additions and 0 deletions
|
|
@ -26,6 +26,12 @@ if (CMAKE_Fortran_COMPILER_ID STREQUAL "GNU")
|
|||
target_compile_options(libomp-mod PRIVATE -fno-range-check)
|
||||
endif ()
|
||||
|
||||
if ("${LLVM_DEFAULT_TARGET_TRIPLE}" MATCHES "^amdgcn|^nvptx")
|
||||
target_compile_options(libomp-mod PRIVATE
|
||||
$<$<COMPILE_LANGUAGE:Fortran>:-nogpulib -flto>
|
||||
)
|
||||
endif ()
|
||||
|
||||
flang_module_target(libomp-mod PUBLIC)
|
||||
add_dependencies(libomp-mod ${RUNTIMES_FORTRAN_BUILD_DEPS})
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue