Commit 85a7d722 authored by Victor Costan's avatar Victor Costan Committed by Commit Bot

tools: Fix download_lld_mac for LLVM 9+.

The LLVM project moved from SVN to git, and lld's version information
does not include SVN revisions anymore. This CL makes the version
parsing in download_lld_mac.py permissive enought to accept git commit
hashes.

Bug: 897796
Change-Id: I0d11703f6982172dd64e7d7c9a64dcaa2fe6757f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1630811
Commit-Queue: Nico Weber <thakis@chromium.org>
Reviewed-by: default avatarNico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#663718}
parent 4118f7eb
......@@ -20,7 +20,9 @@ def AlreadyUpToDate():
if not os.path.exists(LLD_LINK_PATH):
return False
lld_rev = subprocess.check_output([LLD_LINK_PATH, '--version'])
return (re.match(r'LLD.*\(.*trunk (\d+)\)', lld_rev).group(1) ==
# Version output example:
# LLD 9.0.0 (https://github.com/llvm/llvm-project/ 342571e8d6eb1afb151ae1103431798e3d24054f)
return (re.match(r'LLD.*\(.*git.*llvm.* ([0-9a-f]+)\)', lld_rev).group(1) ==
update.CLANG_REVISION)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment