Skip to content

Commit fd427ba

Browse files
authored
Merge pull request #1710 from LLNL/bugfix/chapman39/no-fortran-toss4_cray-build
add certain hip link flags whether or not fortran
2 parents b6f909b + 3303b09 commit fd427ba

File tree

1 file changed

+10
-13
lines changed

1 file changed

+10
-13
lines changed

scripts/spack/packages/axom/package.py

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -378,23 +378,20 @@ def initconfig_hardware_entries(self):
378378
)
379379
hip_link_flags += "-lmpi_gtl_hsa "
380380

381+
if spec.satisfies("^[email protected]:"):
382+
hip_link_flags += "-L{0}/lib/llvm/lib -Wl,-rpath,{0}/lib/llvm/lib ".format(rocm_root)
383+
else:
384+
hip_link_flags += "-L{0}/llvm/lib -Wl,-rpath,{0}/llvm/lib ".format(rocm_root)
385+
# Only amdclang requires this path; cray compiler fails if this is included
386+
if spec.satisfies("%llvm-amdgpu"):
387+
hip_link_flags += "-L{0}/lib -Wl,-rpath,{0}/lib ".format(rocm_root)
388+
hip_link_flags += "-lpgmath -lompstub "
389+
381390
# Fixes for mpi for rocm until wrapper paths are fixed
382391
# These flags are already part of the wrapped compilers on TOSS4 systems
383392
if spec.satisfies("+fortran") and self.is_fortran_compiler("amdflang"):
384-
385393
hip_link_flags += "-Wl,--disable-new-dtags "
386-
387-
if spec.satisfies("^[email protected]:"):
388-
hip_link_flags += "-L{0}/lib/llvm/lib -Wl,-rpath,{0}/lib/llvm/lib ".format(
389-
rocm_root
390-
)
391-
else:
392-
hip_link_flags += "-L{0}/llvm/lib -Wl,-rpath,{0}/llvm/lib ".format(rocm_root)
393-
394-
# Only amdclang requires this path; cray compiler fails if this is included
395-
hip_link_flags += "-L{0}/lib -Wl,-rpath,{0}/lib ".format(rocm_root)
396-
397-
hip_link_flags += "-lpgmath -lflang -lflangrti -lompstub "
394+
hip_link_flags += "-lflang -lflangrti "
398395

399396
# Additional library path for cray compiler
400397
if self.spec.satisfies("%cce"):

0 commit comments

Comments
 (0)