-
Notifications
You must be signed in to change notification settings - Fork 421
Open
Description
Every time I compile HiPACE++ (using AMReX development) for MI250X, I get the following warning:
clang++: warning: argument unused during compilation: '-Xoffload-linker --whole-archive' [-Wunused-command-line-argument]
It also happens in the CI of hipace; however, seemingly not with amrex.
https://github.com/Hi-PACE/hipace/actions/runs/18302787740/job/52113807454#step:5:586
https://github.com/Hi-PACE/hipace/actions/runs/18302787740/workflow
I noticed that the two options are explicitly set by AMReX; however, I don't know for which HIP versions this is/was necessary or if the compiler or linker prints the warning.
amrex/Tools/CMake/AMReXParallelBackends.cmake
Lines 347 to 360 in 26054b2
# ROCm 5.5: hipcc now relies on clang to offload code objects from (.a) archive files, | |
# so we need to tell the offload-linker to include all code objects in archives. | |
include(CheckLinkerFlag) | |
check_linker_flag( | |
CXX | |
"SHELL:-Xoffload-linker --whole-archive" | |
LINKER_HAS_WHOLE_ARCHIVE_OFFLOAD) | |
if(LINKER_HAS_WHOLE_ARCHIVE_OFFLOAD) | |
foreach(D IN LISTS AMReX_SPACEDIM) | |
target_link_options(amrex_${D}d PUBLIC | |
"$<$<LINK_LANGUAGE:HIP>:SHELL:-Xoffload-linker --whole-archive>" | |
"$<$<LINK_LANGUAGE:CXX>:SHELL:-Xoffload-linker --whole-archive>") | |
endforeach() | |
endif() |
Metadata
Metadata
Assignees
Labels
No labels