spack.compilers.clang: add new version check (#14365)
This commit is contained in:
parent
8a82c930bb
commit
2028687efe
@ -208,7 +208,9 @@ def extract_version_from_output(cls, output):
|
|||||||
r'^Apple (?:LLVM|clang) version ([^ )]+)|'
|
r'^Apple (?:LLVM|clang) version ([^ )]+)|'
|
||||||
# Normal clang compiler versions are left as-is
|
# Normal clang compiler versions are left as-is
|
||||||
r'clang version ([^ )]+)-svn[~.\w\d-]*|'
|
r'clang version ([^ )]+)-svn[~.\w\d-]*|'
|
||||||
r'clang version ([^ )]+)-[~.\w\d-]*|'
|
# Don't include hyphenated patch numbers in the version
|
||||||
|
# (see https://github.com/spack/spack/pull/14365 for details)
|
||||||
|
r'clang version ([^ )]+?)-[~.\w\d-]*|'
|
||||||
r'clang version ([^ )]+)',
|
r'clang version ([^ )]+)',
|
||||||
output
|
output
|
||||||
)
|
)
|
||||||
|
@ -348,6 +348,14 @@ def test_fj_flags():
|
|||||||
('clang version 8.0.0-3~ubuntu18.04.1 (tags/RELEASE_800/final)\n'
|
('clang version 8.0.0-3~ubuntu18.04.1 (tags/RELEASE_800/final)\n'
|
||||||
'Target: x86_64-pc-linux-gnu\n'
|
'Target: x86_64-pc-linux-gnu\n'
|
||||||
'Thread model: posix\n'
|
'Thread model: posix\n'
|
||||||
|
'InstalledDir: /usr/bin\n', '8.0.0'),
|
||||||
|
('clang version 9.0.1-+201911131414230800840845a1eea-1~exp1~20191113231141.78\n' # noqa
|
||||||
|
'Target: x86_64-pc-linux-gnu\n'
|
||||||
|
'Thread model: posix\n'
|
||||||
|
'InstalledDir: /usr/bin\n', '9.0.1'),
|
||||||
|
('clang version 8.0.0-3 (tags/RELEASE_800/final)\n'
|
||||||
|
'Target: aarch64-unknown-linux-gnu\n'
|
||||||
|
'Thread model: posix\n'
|
||||||
'InstalledDir: /usr/bin\n', '8.0.0')
|
'InstalledDir: /usr/bin\n', '8.0.0')
|
||||||
])
|
])
|
||||||
def test_clang_version_detection(version_str, expected_version):
|
def test_clang_version_detection(version_str, expected_version):
|
||||||
|
Loading…
Reference in New Issue
Block a user