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 subprocess | 11 import subprocess |
12 import sys | 12 import sys |
13 | 13 |
14 # Do NOT CHANGE this if you don't know what you're doing -- see | 14 # Do NOT CHANGE this if you don't know what you're doing -- see |
15 # https://code.google.com/p/chromium/wiki/UpdatingClang | 15 # https://code.google.com/p/chromium/wiki/UpdatingClang |
16 # Reverting problematic clang rolls is safe, though. | 16 # Reverting problematic clang rolls is safe, though. |
17 # Note: this revision is only used for Windows. Other platforms use update.sh. | 17 # Note: this revision is only used for Windows. Other platforms use update.sh. |
18 LLVM_WINDOWS_REVISION = '201612' | 18 LLVM_WINDOWS_REVISION = '201742' |
19 | 19 |
20 # Path constants. (All of these should be absolute paths.) | 20 # Path constants. (All of these should be absolute paths.) |
21 THIS_DIR = os.path.abspath(os.path.dirname(__file__)) | 21 THIS_DIR = os.path.abspath(os.path.dirname(__file__)) |
22 CHROMIUM_DIR = os.path.abspath(os.path.join(THIS_DIR, '..', '..', '..')) | 22 CHROMIUM_DIR = os.path.abspath(os.path.join(THIS_DIR, '..', '..', '..')) |
23 LLVM_DIR = os.path.join(CHROMIUM_DIR, 'third_party', 'llvm') | 23 LLVM_DIR = os.path.join(CHROMIUM_DIR, 'third_party', 'llvm') |
24 LLVM_BUILD_DIR = os.path.join(CHROMIUM_DIR, 'third_party', 'llvm-build', | 24 LLVM_BUILD_DIR = os.path.join(CHROMIUM_DIR, 'third_party', 'llvm-build', |
25 'Release+Asserts') | 25 'Release+Asserts') |
26 CLANG_DIR = os.path.join(LLVM_DIR, 'tools', 'clang') | 26 CLANG_DIR = os.path.join(LLVM_DIR, 'tools', 'clang') |
27 COMPILER_RT_DIR = os.path.join(LLVM_DIR, 'projects', 'compiler-rt') | 27 COMPILER_RT_DIR = os.path.join(LLVM_DIR, 'projects', 'compiler-rt') |
28 STAMP_FILE = os.path.join(LLVM_BUILD_DIR, 'cr_build_revision') | 28 STAMP_FILE = os.path.join(LLVM_BUILD_DIR, 'cr_build_revision') |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 | 162 |
163 if not re.search('clang=1', os.environ.get('GYP_DEFINES', '')): | 163 if not re.search('clang=1', os.environ.get('GYP_DEFINES', '')): |
164 print 'Skipping Clang update (clang=1 was not set in GYP_DEFINES).' | 164 print 'Skipping Clang update (clang=1 was not set in GYP_DEFINES).' |
165 return 0 | 165 return 0 |
166 | 166 |
167 return UpdateClang() | 167 return UpdateClang() |
168 | 168 |
169 | 169 |
170 if __name__ == '__main__': | 170 if __name__ == '__main__': |
171 sys.exit(main()) | 171 sys.exit(main()) |
OLD | NEW |