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

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

Issue 1234713002: win/clang: Roll clang 239674:242415 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 242415 Created 5 years, 5 months 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 | « build/config/compiler/BUILD.gn ('k') | 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 """Windows can't run .sh files, so this is a Python implementation of 6 """Windows can't run .sh files, so this is a Python implementation of
7 update.sh. This script should replace update.sh on all platforms eventually.""" 7 update.sh. This script should replace update.sh on all platforms eventually."""
8 8
9 import argparse 9 import argparse
10 import contextlib 10 import contextlib
(...skipping 10 matching lines...) Expand all
21 import time 21 import time
22 import urllib2 22 import urllib2
23 import zipfile 23 import zipfile
24 24
25 # Do NOT CHANGE this if you don't know what you're doing -- see 25 # Do NOT CHANGE this if you don't know what you're doing -- see
26 # https://code.google.com/p/chromium/wiki/UpdatingClang 26 # https://code.google.com/p/chromium/wiki/UpdatingClang
27 # Reverting problematic clang rolls is safe, though. 27 # Reverting problematic clang rolls is safe, though.
28 # Note: this revision is only used for Windows. Other platforms use update.sh. 28 # Note: this revision is only used for Windows. Other platforms use update.sh.
29 # TODO(thakis): Use the same revision on Windows and non-Windows. 29 # TODO(thakis): Use the same revision on Windows and non-Windows.
30 # TODO(thakis): Remove update.sh, use update.py everywhere. 30 # TODO(thakis): Remove update.sh, use update.py everywhere.
31 LLVM_WIN_REVISION = '239674' 31 LLVM_WIN_REVISION = '242415'
32 32
33 use_head_revision = 'LLVM_FORCE_HEAD_REVISION' in os.environ 33 use_head_revision = 'LLVM_FORCE_HEAD_REVISION' in os.environ
34 if use_head_revision: 34 if use_head_revision:
35 LLVM_WIN_REVISION = 'HEAD' 35 LLVM_WIN_REVISION = 'HEAD'
36 36
37 # This is incremented when pushing a new build of Clang at the same revision. 37 # This is incremented when pushing a new build of Clang at the same revision.
38 CLANG_SUB_REVISION=1 38 CLANG_SUB_REVISION=1
39 39
40 PACKAGE_VERSION = "%s-%s" % (LLVM_WIN_REVISION, CLANG_SUB_REVISION) 40 PACKAGE_VERSION = "%s-%s" % (LLVM_WIN_REVISION, CLANG_SUB_REVISION)
41 41
(...skipping 11 matching lines...) Expand all
53 COMPILER_RT_BUILD_DIR = os.path.join(LLVM_BUILD_DIR, '32bit-compiler-rt') 53 COMPILER_RT_BUILD_DIR = os.path.join(LLVM_BUILD_DIR, '32bit-compiler-rt')
54 CLANG_DIR = os.path.join(LLVM_DIR, 'tools', 'clang') 54 CLANG_DIR = os.path.join(LLVM_DIR, 'tools', 'clang')
55 LLD_DIR = os.path.join(LLVM_DIR, 'tools', 'lld') 55 LLD_DIR = os.path.join(LLVM_DIR, 'tools', 'lld')
56 COMPILER_RT_DIR = os.path.join(LLVM_DIR, 'projects', 'compiler-rt') 56 COMPILER_RT_DIR = os.path.join(LLVM_DIR, 'projects', 'compiler-rt')
57 LIBCXX_DIR = os.path.join(LLVM_DIR, 'projects', 'libcxx') 57 LIBCXX_DIR = os.path.join(LLVM_DIR, 'projects', 'libcxx')
58 LIBCXXABI_DIR = os.path.join(LLVM_DIR, 'projects', 'libcxxabi') 58 LIBCXXABI_DIR = os.path.join(LLVM_DIR, 'projects', 'libcxxabi')
59 LLVM_BUILD_TOOLS_DIR = os.path.abspath( 59 LLVM_BUILD_TOOLS_DIR = os.path.abspath(
60 os.path.join(LLVM_DIR, '..', 'llvm-build-tools')) 60 os.path.join(LLVM_DIR, '..', 'llvm-build-tools'))
61 STAMP_FILE = os.path.join(LLVM_DIR, '..', 'llvm-build', 'cr_build_revision') 61 STAMP_FILE = os.path.join(LLVM_DIR, '..', 'llvm-build', 'cr_build_revision')
62 BINUTILS_DIR = os.path.join(THIRD_PARTY_DIR, 'binutils') 62 BINUTILS_DIR = os.path.join(THIRD_PARTY_DIR, 'binutils')
63 VERSION = '3.7.0' 63 VERSION = '3.8.0'
64 64
65 # URL for pre-built binaries. 65 # URL for pre-built binaries.
66 CDS_URL = 'https://commondatastorage.googleapis.com/chromium-browser-clang' 66 CDS_URL = 'https://commondatastorage.googleapis.com/chromium-browser-clang'
67 67
68 LLVM_REPO_URL='https://llvm.org/svn/llvm-project' 68 LLVM_REPO_URL='https://llvm.org/svn/llvm-project'
69 if 'LLVM_REPO_URL' in os.environ: 69 if 'LLVM_REPO_URL' in os.environ:
70 LLVM_REPO_URL = os.environ['LLVM_REPO_URL'] 70 LLVM_REPO_URL = os.environ['LLVM_REPO_URL']
71 71
72 72
73 def DownloadUrl(url, output_file): 73 def DownloadUrl(url, output_file):
(...skipping 652 matching lines...) Expand 10 before | Expand all | Expand 10 after
726 # clang previously downloaded, keep it up-to-date. 726 # clang previously downloaded, keep it up-to-date.
727 # If you don't want this, delete third_party/llvm-build on your machine. 727 # If you don't want this, delete third_party/llvm-build on your machine.
728 if os.path.isdir(LLVM_BUILD_DIR): 728 if os.path.isdir(LLVM_BUILD_DIR):
729 is_clang_required = True 729 is_clang_required = True
730 if not is_clang_required: 730 if not is_clang_required:
731 return 0 731 return 0
732 if re.search(r'\b(make_clang_dir)=', os.environ.get('GYP_DEFINES', '')): 732 if re.search(r'\b(make_clang_dir)=', os.environ.get('GYP_DEFINES', '')):
733 print 'Skipping Clang update (make_clang_dir= was set in GYP_DEFINES).' 733 print 'Skipping Clang update (make_clang_dir= was set in GYP_DEFINES).'
734 return 0 734 return 0
735 735
736 if use_head_revision:
737 # TODO(hans): Remove after the next roll.
738 global VERSION
739 VERSION = '3.8.0'
740
741 global LLVM_WIN_REVISION, PACKAGE_VERSION 736 global LLVM_WIN_REVISION, PACKAGE_VERSION
742 if args.print_revision: 737 if args.print_revision:
743 if use_head_revision: 738 if use_head_revision:
744 print GetSvnRevision(LLVM_DIR) 739 print GetSvnRevision(LLVM_DIR)
745 else: 740 else:
746 print PACKAGE_VERSION 741 print PACKAGE_VERSION
747 return 0 742 return 0
748 743
749 if args.print_clang_version: 744 if args.print_clang_version:
750 sys.stdout.write(VERSION) 745 sys.stdout.write(VERSION)
(...skipping 12 matching lines...) Expand all
763 758
764 args.force_local_build = True 759 args.force_local_build = True
765 # Skip local patches when using HEAD: they probably don't apply anymore. 760 # Skip local patches when using HEAD: they probably don't apply anymore.
766 args.with_patches = False 761 args.with_patches = False
767 762
768 return UpdateClang(args) 763 return UpdateClang(args)
769 764
770 765
771 if __name__ == '__main__': 766 if __name__ == '__main__':
772 sys.exit(main()) 767 sys.exit(main())
OLDNEW
« no previous file with comments | « build/config/compiler/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698