avoid unknown cc

This commit is contained in:
lzhengning 2021-06-18 16:47:32 +08:00
parent 28ab13d804
commit 5fd890afa2
1 changed files with 2 additions and 2 deletions

View File

@ -250,8 +250,8 @@ def get_version(output):
if len(v) == 0:
v = re.findall("[0-9]+\\.[0-9]+", version)
assert len(v) != 0, f"Can not find version number from: {version}"
if get_cc_type(output) == 'clang':
version = "("+v[0]+")"
if 'clang' in version and platform.system() == 'Darwin':
version = "("+v[-3]+")"
else:
version = "("+v[-1]+")"
return version