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

Side by Side Diff: tools/clang/scripts/update.py

Issue 1492053005: Don't return early in case force-local-builds is passed. (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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """This script is used to download prebuilt clang binaries. 6 """This script is used to download prebuilt clang binaries.
7 7
8 It is also used by package.py to build the prebuilt clang binaries.""" 8 It is also used by package.py to build the prebuilt clang binaries."""
9 9
10 import argparse 10 import argparse
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 300
301 301
302 def UpdateClang(args): 302 def UpdateClang(args):
303 print 'Updating Clang to %s...' % PACKAGE_VERSION 303 print 'Updating Clang to %s...' % PACKAGE_VERSION
304 304
305 need_gold_plugin = 'LLVM_DOWNLOAD_GOLD_PLUGIN' in os.environ or ( 305 need_gold_plugin = 'LLVM_DOWNLOAD_GOLD_PLUGIN' in os.environ or (
306 sys.platform.startswith('linux') and 306 sys.platform.startswith('linux') and
307 'buildtype=Official' in os.environ.get('GYP_DEFINES', '') and 307 'buildtype=Official' in os.environ.get('GYP_DEFINES', '') and
308 'branding=Chrome' in os.environ.get('GYP_DEFINES', '')) 308 'branding=Chrome' in os.environ.get('GYP_DEFINES', ''))
309 309
310 if ReadStampFile() == PACKAGE_VERSION: 310 if ReadStampFile() == PACKAGE_VERSION and not args.force_local_build:
311 print 'Clang is already up to date.' 311 print 'Clang is already up to date.'
312 if not need_gold_plugin or os.path.exists( 312 if not need_gold_plugin or os.path.exists(
313 os.path.join(LLVM_BUILD_DIR, "lib/LLVMgold.so")): 313 os.path.join(LLVM_BUILD_DIR, "lib/LLVMgold.so")):
314 return 0 314 return 0
315 315
316 # Reset the stamp file in case the build is unsuccessful. 316 # Reset the stamp file in case the build is unsuccessful.
317 WriteStampFile('') 317 WriteStampFile('')
318 318
319 if not args.force_local_build: 319 if not args.force_local_build:
320 cds_file = "clang-%s.tgz" % PACKAGE_VERSION 320 cds_file = "clang-%s.tgz" % PACKAGE_VERSION
(...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after
781 args.force_local_build = True 781 args.force_local_build = True
782 if 'OS=android' not in os.environ.get('GYP_DEFINES', ''): 782 if 'OS=android' not in os.environ.get('GYP_DEFINES', ''):
783 # Only build the Android ASan rt on ToT bots when targetting Android. 783 # Only build the Android ASan rt on ToT bots when targetting Android.
784 args.with_android = False 784 args.with_android = False
785 785
786 return UpdateClang(args) 786 return UpdateClang(args)
787 787
788 788
789 if __name__ == '__main__': 789 if __name__ == '__main__':
790 sys.exit(main()) 790 sys.exit(main())
OLDNEW
« 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