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 |
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
288 aux_sanitizer_include_dir = os.path.join(LLVM_BUILD_DIR, 'lib', 'clang', | 288 aux_sanitizer_include_dir = os.path.join(LLVM_BUILD_DIR, 'lib', 'clang', |
289 VERSION, 'include_sanitizer', | 289 VERSION, 'include_sanitizer', |
290 'sanitizer') | 290 'sanitizer') |
291 if not os.path.exists(aux_sanitizer_include_dir): | 291 if not os.path.exists(aux_sanitizer_include_dir): |
292 os.makedirs(aux_sanitizer_include_dir) | 292 os.makedirs(aux_sanitizer_include_dir) |
293 for _, _, files in os.walk(sanitizer_include_dir): | 293 for _, _, files in os.walk(sanitizer_include_dir): |
294 for f in files: | 294 for f in files: |
295 CopyFile(os.path.join(sanitizer_include_dir, f), | 295 CopyFile(os.path.join(sanitizer_include_dir, f), |
296 aux_sanitizer_include_dir) | 296 aux_sanitizer_include_dir) |
297 | 297 |
298 if args.run_tests: | 298 if args.run_tests or use_head_revision: |
299 os.chdir(LLVM_BUILD_DIR) | 299 os.chdir(LLVM_BUILD_DIR) |
300 RunCommand(GetVSVersion().SetupScript('x64') + | 300 RunCommand(GetVSVersion().SetupScript('x64') + |
301 ['&&', 'ninja', 'cr-check-all']) | 301 ['&&', 'ninja', 'cr-check-all']) |
302 | 302 |
303 WriteStampFile(LLVM_WIN_REVISION) | 303 WriteStampFile(LLVM_WIN_REVISION) |
304 print 'Clang update was successful.' | 304 print 'Clang update was successful.' |
305 return 0 | 305 return 0 |
306 | 306 |
307 | 307 |
308 def main(): | 308 def main(): |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
348 | 348 |
349 if re.search(r'\b(make_clang_dir)=', os.environ.get('GYP_DEFINES', '')): | 349 if re.search(r'\b(make_clang_dir)=', os.environ.get('GYP_DEFINES', '')): |
350 print 'Skipping Clang update (make_clang_dir= was set in GYP_DEFINES).' | 350 print 'Skipping Clang update (make_clang_dir= was set in GYP_DEFINES).' |
351 return 0 | 351 return 0 |
352 | 352 |
353 return UpdateClang(args) | 353 return UpdateClang(args) |
354 | 354 |
355 | 355 |
356 if __name__ == '__main__': | 356 if __name__ == '__main__': |
357 sys.exit(main()) | 357 sys.exit(main()) |
OLD | NEW |