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