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

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

Issue 1507873002: roll clang 254049:254793 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase 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 | « tools/clang/scripts/package.py ('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 """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
11 import cStringIO
12 import distutils.spawn 11 import distutils.spawn
13 import glob 12 import glob
14 import os 13 import os
15 import pipes 14 import pipes
16 import re 15 import re
17 import shutil 16 import shutil
18 import subprocess 17 import subprocess
19 import stat 18 import stat
20 import sys 19 import sys
21 import tarfile 20 import tarfile
22 import tempfile 21 import tempfile
23 import time
24 import urllib2 22 import urllib2
25 import zipfile 23 import zipfile
26 24
27 # 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
28 # https://code.google.com/p/chromium/wiki/UpdatingClang 26 # https://code.google.com/p/chromium/wiki/UpdatingClang
29 # Reverting problematic clang rolls is safe, though. 27 # Reverting problematic clang rolls is safe, though.
30 CLANG_REVISION = '254049' 28 CLANG_REVISION = '254793'
31 29
32 use_head_revision = 'LLVM_FORCE_HEAD_REVISION' in os.environ 30 use_head_revision = 'LLVM_FORCE_HEAD_REVISION' in os.environ
33 if use_head_revision: 31 if use_head_revision:
34 CLANG_REVISION = 'HEAD' 32 CLANG_REVISION = 'HEAD'
35 33
36 # This is incremented when pushing a new build of Clang at the same revision. 34 # This is incremented when pushing a new build of Clang at the same revision.
37 CLANG_SUB_REVISION=1 35 CLANG_SUB_REVISION=1
38 36
39 PACKAGE_VERSION = "%s-%s" % (CLANG_REVISION, CLANG_SUB_REVISION) 37 PACKAGE_VERSION = "%s-%s" % (CLANG_REVISION, CLANG_SUB_REVISION)
40 38
(...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after
509 binutils_incdir = '' 507 binutils_incdir = ''
510 if sys.platform.startswith('linux'): 508 if sys.platform.startswith('linux'):
511 binutils_incdir = os.path.join(BINUTILS_DIR, 'Linux_x64/Release/include') 509 binutils_incdir = os.path.join(BINUTILS_DIR, 'Linux_x64/Release/include')
512 510
513 # If building at head, define a macro that plugins can use for #ifdefing 511 # If building at head, define a macro that plugins can use for #ifdefing
514 # out code that builds at head, but not at CLANG_REVISION or vice versa. 512 # out code that builds at head, but not at CLANG_REVISION or vice versa.
515 if use_head_revision: 513 if use_head_revision:
516 cflags += ['-DLLVM_FORCE_HEAD_REVISION'] 514 cflags += ['-DLLVM_FORCE_HEAD_REVISION']
517 cxxflags += ['-DLLVM_FORCE_HEAD_REVISION'] 515 cxxflags += ['-DLLVM_FORCE_HEAD_REVISION']
518 516
519 # Pin MSan to the old ABI.
520 # TODO(eugenis): Remove when MSan migrates to new ABI (crbug.com/560589).
521 cxxflags += [ '-DMSAN_LINUX_X86_64_OLD_MAPPING' ]
522
523 CreateChromeToolsShim() 517 CreateChromeToolsShim()
524 518
525 deployment_env = None 519 deployment_env = None
526 if deployment_target: 520 if deployment_target:
527 deployment_env = os.environ.copy() 521 deployment_env = os.environ.copy()
528 deployment_env['MACOSX_DEPLOYMENT_TARGET'] = deployment_target 522 deployment_env['MACOSX_DEPLOYMENT_TARGET'] = deployment_target
529 523
530 cmake_args = [] 524 cmake_args = []
531 # TODO(thakis): Unconditionally append this to base_cmake_args instead once 525 # TODO(thakis): Unconditionally append this to base_cmake_args instead once
532 # compiler-rt can build with clang-cl on Windows (http://llvm.org/PR23698) 526 # compiler-rt can build with clang-cl on Windows (http://llvm.org/PR23698)
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
782 args.force_local_build = True 776 args.force_local_build = True
783 if 'OS=android' not in os.environ.get('GYP_DEFINES', ''): 777 if 'OS=android' not in os.environ.get('GYP_DEFINES', ''):
784 # Only build the Android ASan rt on ToT bots when targetting Android. 778 # Only build the Android ASan rt on ToT bots when targetting Android.
785 args.with_android = False 779 args.with_android = False
786 780
787 return UpdateClang(args) 781 return UpdateClang(args)
788 782
789 783
790 if __name__ == '__main__': 784 if __name__ == '__main__':
791 sys.exit(main()) 785 sys.exit(main())
OLDNEW
« no previous file with comments | « tools/clang/scripts/package.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698