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

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

Issue 1491203003: Fix downloading LLVM Gold plugin in the case, when Clang is up to date. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 aca7cb9a79c0d0e791cf2a6a835f081977488720..4bf1bab35f3bf899ffeb0f2c2b7dfdc500997573 100755
--- a/tools/clang/scripts/update.py
+++ b/tools/clang/scripts/update.py
@@ -301,9 +301,17 @@ def GetVSVersion():
def UpdateClang(args):
print 'Updating Clang to %s...' % PACKAGE_VERSION
+
+ need_gold_plugin = 'LLVM_DOWNLOAD_GOLD_PLUGIN' in os.environ or (
+ sys.platform.startswith('linux') and
+ 'buildtype=Official' in os.environ.get('GYP_DEFINES', '') and
+ 'branding=Chrome' in os.environ.get('GYP_DEFINES', ''))
+
if ReadStampFile() == PACKAGE_VERSION:
- print 'Already up to date.'
- return 0
+ print 'Clang is already up to date.'
Adrian Kuegel 2015/12/03 09:29:26 I think this early return breaks the case if you w
+ if not need_gold_plugin or os.path.exists(
+ os.path.join(LLVM_BUILD_DIR, "lib/LLVMgold.so")):
+ return 0
# Reset the stamp file in case the build is unsuccessful.
WriteStampFile('')
@@ -331,10 +339,7 @@ def UpdateClang(args):
# Download the gold plugin if requested to by an environment variable.
# This is used by the CFI ClusterFuzz bot, and it's required for official
# builds on linux.
- if 'LLVM_DOWNLOAD_GOLD_PLUGIN' in os.environ or (
- sys.platform.startswith('linux') and
- 'buildtype=Official' in os.environ.get('GYP_DEFINES', '') and
- 'branding=Chrome' in os.environ.get('GYP_DEFINES', '')):
+ if need_gold_plugin:
RunCommand(['python', CHROMIUM_DIR+'/build/download_gold_plugin.py'])
WriteStampFile(PACKAGE_VERSION)
return 0
« 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