aocc 3.1.0: fix version detection for v3.1.0 (#25084)
This commit is contained in:
parent
c7e8bdf9cf
commit
5698850dc4
@ -98,15 +98,12 @@ def fc_pic_flag(self):
|
|||||||
@classmethod
|
@classmethod
|
||||||
@llnl.util.lang.memoized
|
@llnl.util.lang.memoized
|
||||||
def extract_version_from_output(cls, output):
|
def extract_version_from_output(cls, output):
|
||||||
loc_ver = 'unknown'
|
|
||||||
|
|
||||||
match = re.search(
|
match = re.search(
|
||||||
r'AMD clang version ([^ )]+)',
|
r'AOCC_(\d+)[._](\d+)[._](\d+)',
|
||||||
output
|
output
|
||||||
)
|
)
|
||||||
if match:
|
if match:
|
||||||
loc_ver = output.split('AOCC_')[1].split('-')[0]
|
return '.'.join(match.groups())
|
||||||
return loc_ver
|
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def fc_version(cls, fortran_compiler):
|
def fc_version(cls, fortran_compiler):
|
||||||
|
@ -345,6 +345,11 @@ def _module(cmd, *args):
|
|||||||
|
|
||||||
@pytest.mark.parametrize('version_str,expected_version', [
|
@pytest.mark.parametrize('version_str,expected_version', [
|
||||||
# This applies to C,C++ and FORTRAN compiler
|
# This applies to C,C++ and FORTRAN compiler
|
||||||
|
('AMD clang version 12.0.0 (CLANG: AOCC_3_1_0-Build#126 2021_06_07)'
|
||||||
|
'(based on LLVM Mirror.Version.12.0.0)\n'
|
||||||
|
'Target: x86_64-unknown-linux-gnu\n'
|
||||||
|
'Thread model: posix\n', '3.1.0'
|
||||||
|
),
|
||||||
('AMD clang version 12.0.0 (CLANG: AOCC_3.0.0-Build#78 2020_12_10)'
|
('AMD clang version 12.0.0 (CLANG: AOCC_3.0.0-Build#78 2020_12_10)'
|
||||||
'(based on LLVM Mirror.Version.12.0.0)\n'
|
'(based on LLVM Mirror.Version.12.0.0)\n'
|
||||||
'Target: x86_64-unknown-linux-gnu\n'
|
'Target: x86_64-unknown-linux-gnu\n'
|
||||||
|
Loading…
Reference in New Issue
Block a user