amrex
amrex copied to clipboard
Unused linker options when compiling for AMD GPUs
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. https://github.com/AMReX-Codes/amrex/blob/26054b26bb653e594835a5a686893f6c20e7c5cd/Tools/CMake/AMReXParallelBackends.cmake#L347-L360