[get_clang_version] Make the version regex permissive

For instance, this will match `clang-dev` when using a local build of
llvm-toolchain.

Test: run script
Change-Id: I3f2a0a6adc360f0a299def79535ce139353aece2
This commit is contained in:
Pirama Arumuga Nainar 2021-10-06 09:42:35 -07:00
parent ba26bdc316
commit 811a1ae270

View file

@ -34,7 +34,7 @@ def get_clang_prebuilts_version(global_go):
with open(global_go) as infile:
contents = infile.read()
regex_rev = r'\tClangDefaultVersion\s+= "(?P<rev>clang-r\d+[a-z]?\d?)"'
regex_rev = r'\tClangDefaultVersion\s+= "(?P<rev>clang-.*)"'
match_rev = re.search(regex_rev, contents)
if match_rev is None:
raise RuntimeError('Parsing clang info failed')