summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/compilers/clang.py2
-rw-r--r--lib/spack/spack/test/compilers.py5
2 files changed, 6 insertions, 1 deletions
diff --git a/lib/spack/spack/compilers/clang.py b/lib/spack/spack/compilers/clang.py
index 209759e7be..ea4ddaf401 100644
--- a/lib/spack/spack/compilers/clang.py
+++ b/lib/spack/spack/compilers/clang.py
@@ -205,7 +205,7 @@ class Clang(Compiler):
ver = 'unknown'
match = re.search(
# Apple's LLVM compiler has its own versions, so suffix them.
- r'^Apple LLVM version ([^ )]+)|'
+ r'^Apple (?:LLVM|clang) version ([^ )]+)|'
# Normal clang compiler versions are left as-is
r'clang version ([^ )]+)-svn[~.\w\d-]*|'
r'clang version ([^ )]+)-[~.\w\d-]*|'
diff --git a/lib/spack/spack/test/compilers.py b/lib/spack/spack/test/compilers.py
index 171d390de6..dc104225f1 100644
--- a/lib/spack/spack/test/compilers.py
+++ b/lib/spack/spack/test/compilers.py
@@ -329,6 +329,11 @@ def test_fj_flags():
@pytest.mark.regression('10191')
@pytest.mark.parametrize('version_str,expected_version', [
# macOS clang
+ ('Apple clang version 11.0.0 (clang-1100.0.33.8)\n'
+ 'Target: x86_64-apple-darwin18.7.0\n'
+ 'Thread model: posix\n'
+ 'InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin\n', # noqa
+ '11.0.0-apple'),
('Apple LLVM version 7.0.2 (clang-700.1.81)\n'
'Target: x86_64-apple-darwin15.2.0\n'
'Thread model: posix\n', '7.0.2-apple'),