If I bulid by cmake according to the lammps doc,
cmake -D PKG_GPU=on -D GPU_API=HIP -D HIP_ARCH=gfx906 -D CMAKE_CXX_COMPILER=hipcc …/camke is OK
When make -j 4, following error appeared.
[100%] Linking CXX executable lmp
Attribute ‘optnone’ requires ‘noinline’!
void ("class.LAMMPS_NS::Modify"*)* @_ZN9LAMMPS_NS6Modify16create_factoriesEv
Attribute 'optnone' requires 'noinline'!
void (“class.LAMMPS_NS::Force”) @_ZN9LAMMPS_NS5Force16create_factoriesEv
Attribute ‘optnone’ requires ‘noinline’!
void ("class.LAMMPS_NS::LAMMPS"*)* @_ZN9LAMMPS_NS6LAMMPS14init_pkg_listsEv
Attribute 'optnone' requires 'noinline'!
void (“class.LAMMPS_NS::LAMMPS”) @_ZN9LAMMPS_NS6LAMMPS4helpEv
LLVM ERROR: Broken module found, compilation aborted!
Generating AMD GCN kernel failed in HCC-specific opt passes for target: gfx906
clang-10: error: linker command failed with exit code 1 (use -v to see invocation)