Skip to content
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
14 changes: 14 additions & 0 deletions cmake/GPU.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,20 @@ elseif (CMAKE_Fortran_COMPILER_ID STREQUAL "Flang")
if (CMAKE_BUILD_TYPE STREQUAL "Debug" OR CMAKE_BUILD_TYPE STREQUAL "RelDebug")
add_compile_options($<$<COMPILE_LANGUAGE:Fortran>:-O1> $<$<COMPILE_LANGUAGE:Fortran>:-g>)
endif()
elseif (CMAKE_Fortran_COMPILER_ID STREQUAL "LLVMFlang")
# AMD/LLVM flang (amdflang). These are CPU-build flags only; the OpenMP-offload GPU
# build sets its own flags (MFCTargets.cmake) and links via the offload wrapper, so
# it is left untouched here.
if (NOT (MFC_OpenMP OR MFC_OpenACC))
if (CMAKE_BUILD_TYPE STREQUAL "Debug" OR CMAKE_BUILD_TYPE STREQUAL "RelDebug")
# Ordinary (non-LTO) objects plus static deps built without -fPIC
# (e.g. libfftw3) hit ld.lld's default-PIE "relocation R_X86_64_32
# against local symbol". Link a non-PIE executable to accept them.
# Release links fine via LTO's link-time PIC codegen, so it is left alone.
add_link_options(-no-pie)
add_compile_options($<$<COMPILE_LANGUAGE:Fortran>:-O1> $<$<COMPILE_LANGUAGE:Fortran>:-g>)
endif()
endif()
elseif (CMAKE_Fortran_COMPILER_ID STREQUAL "Intel")
add_compile_options($<$<COMPILE_LANGUAGE:Fortran>:-free>)

Expand Down
Loading