summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/compilers/clang.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/spack/spack/compilers/clang.py b/lib/spack/spack/compilers/clang.py
index 88154a1921..4f93d04f5f 100644
--- a/lib/spack/spack/compilers/clang.py
+++ b/lib/spack/spack/compilers/clang.py
@@ -38,10 +38,10 @@ class Clang(Compiler):
cxx_names = ["clang++"]
# Subclasses use possible names of Fortran 77 compiler
- f77_names = ["flang"]
+ f77_names = ["flang-new", "flang"]
# Subclasses use possible names of Fortran 90 compiler
- fc_names = ["flang"]
+ fc_names = ["flang-new", "flang"]
version_argument = "--version"
@@ -171,10 +171,11 @@ class Clang(Compiler):
match = re.search(
# Normal clang compiler versions are left as-is
- r"clang version ([^ )\n]+)-svn[~.\w\d-]*|"
+ r"(?:clang|flang-new) version ([^ )\n]+)-svn[~.\w\d-]*|"
# Don't include hyphenated patch numbers in the version
# (see https://github.com/spack/spack/pull/14365 for details)
- r"clang version ([^ )\n]+?)-[~.\w\d-]*|" r"clang version ([^ )\n]+)",
+ r"(?:clang|flang-new) version ([^ )\n]+?)-[~.\w\d-]*|"
+ r"(?:clang|flang-new) version ([^ )\n]+)",
output,
)
if match: