Allow remapping of compiler names (#45299)

CCE in spack is Cray on the Score-P configure line. Others can be added.

Co-authored-by: William Williams <william.williams@tu-dresden.de>
This commit is contained in:
Bill Williams 2024-07-18 19:48:51 +02:00 committed by GitHub
parent 2a178bfbb0
commit fca9cc3e0e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -157,6 +157,14 @@ def find_libpath(self, libname, root):
return None
return libs.directories[0]
# handle any mapping of Spack compiler names to Score-P args
# this should continue to exist for backward compatibility
def clean_compiler(self, compiler):
renames = {"cce": "cray"}
if compiler in renames:
return renames[compiler]
return compiler
def configure_args(self):
spec = self.spec
@ -166,7 +174,8 @@ def configure_args(self):
"--enable-shared",
]
cname = spec.compiler.name
cname = self.clean_compiler(spec.compiler.name)
config_args.append("--with-nocross-compiler-suite={0}".format(cname))
if self.version >= Version("4.0"):