External package detection for compilers (#43464)

This creates shared infrastructure for compiler packages to implement the 
detailed search capabilities from the `spack compiler find` command for the 
`spack external find` command.

After this commit, `spack compiler find` can be replaced with 
`spack external find --tag compiler`, with the exception of mixed toolchains.
This commit is contained in:
Greg Becker
2024-05-06 01:33:33 -07:00
committed by GitHub
parent 27aeb6e293
commit 1f31c3374c
41 changed files with 1375 additions and 698 deletions

View File

@@ -8,7 +8,7 @@
from spack.package import *
class Aocc(Package):
class Aocc(Package, CompilerPackage):
"""
The AOCC compiler system is a high performance, production quality code
generation tool. The AOCC environment provides various options to developers
@@ -104,3 +104,9 @@ def cfg_files(self):
for compiler in ["clang", "clang++"]:
with open(join_path(self.prefix.bin, "{}.cfg".format(compiler)), "w") as f:
f.write(compiler_options)
compiler_version_argument = "--version"
compiler_version_regex = r"AOCC_(\d+[._]\d+[._]\d+)"
c_names = ["clang"]
cxx_names = ["clang++"]
fortran_names = ["flang"]