Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(805)

Unified Diff: tools/clang/scripts/update.py

Issue 1468243002: update.py: Download platform-appropriate prebuilt clang (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: whoops did not mean to upload that patchset Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/clang/scripts/update.py
diff --git a/tools/clang/scripts/update.py b/tools/clang/scripts/update.py
index 6cb140003f20762a0cf02c9cabe973d5c411d9be..ad59c8414802d86d3b0a304028be1c3550c9b028 100755
--- a/tools/clang/scripts/update.py
+++ b/tools/clang/scripts/update.py
@@ -97,7 +97,7 @@ def ReadStampFile():
"""Return the contents of the stamp file, or '' if it doesn't exist."""
try:
with open(STAMP_FILE, 'r') as f:
- return f.read()
+ return f.read().rstrip()
except IOError:
return ''
@@ -108,6 +108,7 @@ def WriteStampFile(s):
os.makedirs(os.path.dirname(STAMP_FILE))
with open(STAMP_FILE, 'w') as f:
f.write(s)
+ f.write('\n')
def GetSvnRevision(svn_repo):
@@ -281,7 +282,13 @@ def UpdateClang(args):
if not args.force_local_build:
cds_file = "clang-%s.tgz" % PACKAGE_VERSION
- cds_full_url = CDS_URL + '/Win/' + cds_file
+ if sys.platform == 'win32':
+ cds_full_url = CDS_URL + '/Win/' + cds_file
+ elif sys.platform == 'darwin':
+ cds_full_url = CDS_URL + '/Mac/' + cds_file
+ else:
+ assert sys.platform.startswith('linux')
+ cds_full_url = CDS_URL + '/Linux_x64/' + cds_file
# Check if there's a prebuilt binary and if so just fetch that. That's
# faster, and goma relies on having matching binary hashes on client and
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698