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