Commit 16e7fac6 authored by Hans Wennborg's avatar Hans Wennborg Committed by Chromium LUCI CQ

Clang build scripts: LLVM 'master' is now 'main'

See http://lists.llvm.org/pipermail/llvm-dev/2020-December/147175.html

Bug: none
Change-Id: Ifd6abe11b833961d9ff25bdd6e9d3315523cd95f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2577360Reviewed-by: default avatarNico Weber <thakis@chromium.org>
Commit-Queue: Hans Wennborg <hans@chromium.org>
Cr-Commit-Position: refs/heads/master@{#834214}
parent e503e880
...@@ -165,8 +165,9 @@ def UrlOpen(url): ...@@ -165,8 +165,9 @@ def UrlOpen(url):
def GetLatestLLVMCommit(): def GetLatestLLVMCommit():
"""Get the latest commit hash in the LLVM monorepo.""" """Get the latest commit hash in the LLVM monorepo."""
ref = json.loads(UrlOpen(('https://api.github.com/repos/' ref = json.loads(
'llvm/llvm-project/git/refs/heads/master'))) UrlOpen(('https://api.github.com/repos/'
'llvm/llvm-project/git/refs/heads/main')))
assert ref['object']['type'] == 'commit' assert ref['object']['type'] == 'commit'
return ref['object']['sha'] return ref['object']['sha']
......
...@@ -50,7 +50,7 @@ def FetchLLVM(checkout_dir, revision): ...@@ -50,7 +50,7 @@ def FetchLLVM(checkout_dir, revision):
except subprocess.CalledProcessError: except subprocess.CalledProcessError:
# Otherwise, try to update it. # Otherwise, try to update it.
print('-- Attempting to update existing repo') print('-- Attempting to update existing repo')
args = ['git', 'pull', '--rebase', 'origin', 'master'] args = ['git', 'pull', '--rebase', 'origin', 'main']
subprocess.check_call(args, cwd=checkout_dir, shell=sys.platform == 'win32') subprocess.check_call(args, cwd=checkout_dir, shell=sys.platform == 'win32')
if revision: if revision:
args = ['git', 'checkout', revision] args = ['git', 'checkout', 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