Skip to content

Commit 1874469

Browse files
MarcoFalkepull[bot]
authored andcommitted
Update configure.py to support pre-release versions of clang
1 parent d9c1026 commit 1874469

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

configure.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -914,12 +914,16 @@ def retrieve_clang_version(clang_executable):
914914

915915
curr_version_split = curr_version.lower().split('clang version ')
916916
if len(curr_version_split) > 1:
917-
curr_version = curr_version_split[1].split()[0]
917+
curr_version = curr_version_split[1].split()[0].split('git')
918918

919+
if len(curr_version) > 1:
920+
print('WARNING: current clang installation is not a release version.\n')
921+
922+
curr_version = curr_version[0]
919923
curr_version_int = convert_version_to_int(curr_version)
920924
# Check if current clang version can be detected properly.
921925
if not curr_version_int:
922-
print('WARNING: current clang installation is not a release version.\n')
926+
print('WARNING: current clang installation version unknown.\n')
923927
return None
924928

925929
print('You have Clang %s installed.\n' % curr_version)

0 commit comments

Comments
 (0)