Fix issue when generating compiler hierarchy (#34873)

- [x] Fix bug affecting generation of Lmod modules
This commit is contained in:
Massimiliano Culpo 2023-01-11 19:09:02 +01:00 committed by GitHub
parent fa93b5219c
commit ccb9969b64
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -180,7 +180,7 @@ def provides(self):
# If it is in the list of supported compilers family -> compiler
if self.spec.name in spack.compilers.supported_compilers():
provides["compiler"] = spack.spec.CompilerSpec(str(self.spec))
provides["compiler"] = spack.spec.CompilerSpec(self.spec.format("{name}{@version}"))
elif self.spec.name in spack.compilers.package_name_to_compiler_name:
# If it is the package for a supported compiler, but of a different name
cname = spack.compilers.package_name_to_compiler_name[self.spec.name]