OLD | NEW |
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 os | 10 import os |
11 import re | 11 import re |
12 import shutil | 12 import shutil |
13 import subprocess | 13 import subprocess |
14 import stat | 14 import stat |
15 import sys | 15 import sys |
16 import time | 16 import time |
17 | 17 |
18 # Do NOT CHANGE this if you don't know what you're doing -- see | 18 # Do NOT CHANGE this if you don't know what you're doing -- see |
19 # https://code.google.com/p/chromium/wiki/UpdatingClang | 19 # https://code.google.com/p/chromium/wiki/UpdatingClang |
20 # Reverting problematic clang rolls is safe, though. | 20 # Reverting problematic clang rolls is safe, though. |
21 # Note: this revision is only used for Windows. Other platforms use update.sh. | 21 # Note: this revision is only used for Windows. Other platforms use update.sh. |
22 LLVM_WIN_REVISION = 'HEAD' | 22 LLVM_WIN_REVISION = 'HEAD' |
23 | 23 |
24 # ASan on Windows is useful enough to use it even while the clang/win is still | 24 # ASan on Windows is useful enough to use it even while the clang/win is still |
25 # in bringup. Use a pinned revision to make it slightly more stable. | 25 # in bringup. Use a pinned revision to make it slightly more stable. |
26 use_head_revision = ('LLVM_FORCE_HEAD_REVISION' in os.environ or | 26 use_head_revision = ('LLVM_FORCE_HEAD_REVISION' in os.environ or |
27 not re.search(r'\b(asan)=1', os.environ.get('GYP_DEFINES', ''))) | 27 not re.search(r'\b(asan)=1', os.environ.get('GYP_DEFINES', ''))) |
28 | 28 |
29 if not use_head_revision: | 29 if not use_head_revision: |
30 LLVM_WIN_REVISION = '235968' | 30 LLVM_WIN_REVISION = '237003' |
31 | 31 |
32 # Path constants. (All of these should be absolute paths.) | 32 # Path constants. (All of these should be absolute paths.) |
33 THIS_DIR = os.path.abspath(os.path.dirname(__file__)) | 33 THIS_DIR = os.path.abspath(os.path.dirname(__file__)) |
34 CHROMIUM_DIR = os.path.abspath(os.path.join(THIS_DIR, '..', '..', '..')) | 34 CHROMIUM_DIR = os.path.abspath(os.path.join(THIS_DIR, '..', '..', '..')) |
35 LLVM_DIR = os.path.join(CHROMIUM_DIR, 'third_party', 'llvm') | 35 LLVM_DIR = os.path.join(CHROMIUM_DIR, 'third_party', 'llvm') |
36 CHROME_TOOLS_SHIM_DIR = os.path.join(LLVM_DIR, 'tools', 'chrometools') | 36 CHROME_TOOLS_SHIM_DIR = os.path.join(LLVM_DIR, 'tools', 'chrometools') |
37 LLVM_BUILD_DIR = os.path.join(CHROMIUM_DIR, 'third_party', 'llvm-build', | 37 LLVM_BUILD_DIR = os.path.join(CHROMIUM_DIR, 'third_party', 'llvm-build', |
38 'Release+Asserts') | 38 'Release+Asserts') |
39 COMPILER_RT_BUILD_DIR = os.path.join(LLVM_BUILD_DIR, '32bit-compiler-rt') | 39 COMPILER_RT_BUILD_DIR = os.path.join(LLVM_BUILD_DIR, '32bit-compiler-rt') |
40 CLANG_DIR = os.path.join(LLVM_DIR, 'tools', 'clang') | 40 CLANG_DIR = os.path.join(LLVM_DIR, 'tools', 'clang') |
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
342 | 342 |
343 if re.search(r'\b(make_clang_dir)=', os.environ.get('GYP_DEFINES', '')): | 343 if re.search(r'\b(make_clang_dir)=', os.environ.get('GYP_DEFINES', '')): |
344 print 'Skipping Clang update (make_clang_dir= was set in GYP_DEFINES).' | 344 print 'Skipping Clang update (make_clang_dir= was set in GYP_DEFINES).' |
345 return 0 | 345 return 0 |
346 | 346 |
347 return UpdateClang(args) | 347 return UpdateClang(args) |
348 | 348 |
349 | 349 |
350 if __name__ == '__main__': | 350 if __name__ == '__main__': |
351 sys.exit(main()) | 351 sys.exit(main()) |
OLD | NEW |