| 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 """This script is used to download prebuilt clang binaries. | 6 """This script is used to download prebuilt clang binaries. |
| 7 | 7 |
| 8 It is also used by package.py to build the prebuilt clang binaries.""" | 8 It is also used by package.py to build the prebuilt clang binaries.""" |
| 9 | 9 |
| 10 import argparse | 10 import argparse |
| (...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 439 | 439 |
| 440 cflags = [] | 440 cflags = [] |
| 441 cxxflags = [] | 441 cxxflags = [] |
| 442 ldflags = [] | 442 ldflags = [] |
| 443 | 443 |
| 444 base_cmake_args = ['-GNinja', | 444 base_cmake_args = ['-GNinja', |
| 445 '-DCMAKE_BUILD_TYPE=Release', | 445 '-DCMAKE_BUILD_TYPE=Release', |
| 446 '-DLLVM_ENABLE_ASSERTIONS=ON', | 446 '-DLLVM_ENABLE_ASSERTIONS=ON', |
| 447 '-DLLVM_ENABLE_THREADS=OFF', | 447 '-DLLVM_ENABLE_THREADS=OFF', |
| 448 '-DLLVM_ENABLE_TIMESTAMPS=OFF', | 448 '-DLLVM_ENABLE_TIMESTAMPS=OFF', |
| 449 # Statically link MSVCRT to avoid DLL dependencies. |
| 450 '-DLLVM_USE_CRT_RELEASE=MT', |
| 449 ] | 451 ] |
| 450 | 452 |
| 451 if args.bootstrap: | 453 if args.bootstrap: |
| 452 print 'Building bootstrap compiler' | 454 print 'Building bootstrap compiler' |
| 453 EnsureDirExists(LLVM_BOOTSTRAP_DIR) | 455 EnsureDirExists(LLVM_BOOTSTRAP_DIR) |
| 454 os.chdir(LLVM_BOOTSTRAP_DIR) | 456 os.chdir(LLVM_BOOTSTRAP_DIR) |
| 455 bootstrap_args = base_cmake_args + [ | 457 bootstrap_args = base_cmake_args + [ |
| 456 '-DLLVM_TARGETS_TO_BUILD=host', | 458 '-DLLVM_TARGETS_TO_BUILD=host', |
| 457 '-DCMAKE_INSTALL_PREFIX=' + LLVM_BOOTSTRAP_INSTALL_DIR, | 459 '-DCMAKE_INSTALL_PREFIX=' + LLVM_BOOTSTRAP_INSTALL_DIR, |
| 458 '-DCMAKE_C_FLAGS=' + ' '.join(cflags), | 460 '-DCMAKE_C_FLAGS=' + ' '.join(cflags), |
| (...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 793 args.force_local_build = True | 795 args.force_local_build = True |
| 794 if 'OS=android' not in os.environ.get('GYP_DEFINES', ''): | 796 if 'OS=android' not in os.environ.get('GYP_DEFINES', ''): |
| 795 # Only build the Android ASan rt on ToT bots when targetting Android. | 797 # Only build the Android ASan rt on ToT bots when targetting Android. |
| 796 args.with_android = False | 798 args.with_android = False |
| 797 | 799 |
| 798 return UpdateClang(args) | 800 return UpdateClang(args) |
| 799 | 801 |
| 800 | 802 |
| 801 if __name__ == '__main__': | 803 if __name__ == '__main__': |
| 802 sys.exit(main()) | 804 sys.exit(main()) |
| OLD | NEW |