| 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 478 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 489 os.environ['LD_LIBRARY_PATH'] = os.path.dirname(libstdcpp) | 489 os.environ['LD_LIBRARY_PATH'] = os.path.dirname(libstdcpp) |
| 490 | 490 |
| 491 cflags = [] | 491 cflags = [] |
| 492 cxxflags = [] | 492 cxxflags = [] |
| 493 ldflags = [] | 493 ldflags = [] |
| 494 | 494 |
| 495 base_cmake_args = ['-GNinja', | 495 base_cmake_args = ['-GNinja', |
| 496 '-DCMAKE_BUILD_TYPE=Release', | 496 '-DCMAKE_BUILD_TYPE=Release', |
| 497 '-DLLVM_ENABLE_ASSERTIONS=ON', | 497 '-DLLVM_ENABLE_ASSERTIONS=ON', |
| 498 '-DLLVM_ENABLE_THREADS=OFF', | 498 '-DLLVM_ENABLE_THREADS=OFF', |
| 499 '-DLLVM_ENABLE_TIMESTAMPS=OFF', | |
| 500 # Statically link MSVCRT to avoid DLL dependencies. | 499 # Statically link MSVCRT to avoid DLL dependencies. |
| 501 '-DLLVM_USE_CRT_RELEASE=MT', | 500 '-DLLVM_USE_CRT_RELEASE=MT', |
| 502 ] | 501 ] |
| 503 | 502 |
| 504 binutils_incdir = '' | 503 binutils_incdir = '' |
| 505 if sys.platform.startswith('linux'): | 504 if sys.platform.startswith('linux'): |
| 506 binutils_incdir = os.path.join(BINUTILS_DIR, 'Linux_x64/Release/include') | 505 binutils_incdir = os.path.join(BINUTILS_DIR, 'Linux_x64/Release/include') |
| 507 | 506 |
| 508 if args.bootstrap: | 507 if args.bootstrap: |
| 509 print 'Building bootstrap compiler' | 508 print 'Building bootstrap compiler' |
| (...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 904 args.force_local_build = True | 903 args.force_local_build = True |
| 905 if 'OS=android' not in os.environ.get('GYP_DEFINES', ''): | 904 if 'OS=android' not in os.environ.get('GYP_DEFINES', ''): |
| 906 # Only build the Android ASan rt on ToT bots when targetting Android. | 905 # Only build the Android ASan rt on ToT bots when targetting Android. |
| 907 args.with_android = False | 906 args.with_android = False |
| 908 | 907 |
| 909 return UpdateClang(args) | 908 return UpdateClang(args) |
| 910 | 909 |
| 911 | 910 |
| 912 if __name__ == '__main__': | 911 if __name__ == '__main__': |
| 913 sys.exit(main()) | 912 sys.exit(main()) |
| OLD | NEW |