| 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 708 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 719 parser.add_argument('--print-revision', action='store_true', | 719 parser.add_argument('--print-revision', action='store_true', |
| 720 help='print current clang revision and exit.') | 720 help='print current clang revision and exit.') |
| 721 parser.add_argument('--print-clang-version', action='store_true', | 721 parser.add_argument('--print-clang-version', action='store_true', |
| 722 help='print current clang version (e.g. x.y.z) and exit.') | 722 help='print current clang version (e.g. x.y.z) and exit.') |
| 723 parser.add_argument('--run-tests', action='store_true', | 723 parser.add_argument('--run-tests', action='store_true', |
| 724 help='run tests after building; only for local builds') | 724 help='run tests after building; only for local builds') |
| 725 parser.add_argument('--tools', nargs='*', | 725 parser.add_argument('--tools', nargs='*', |
| 726 help='select which chrome tools to build', | 726 help='select which chrome tools to build', |
| 727 default=['plugins', 'blink_gc_plugin']) | 727 default=['plugins', 'blink_gc_plugin']) |
| 728 parser.add_argument('--without-android', action='store_false', | 728 parser.add_argument('--without-android', action='store_false', |
| 729 help='don\tt build Android ASan runtime (linux only)', | 729 help='don\'t build Android ASan runtime (linux only)', |
| 730 dest='with_android', | 730 dest='with_android', |
| 731 default=sys.platform.startswith('linux')) | 731 default=sys.platform.startswith('linux')) |
| 732 args = parser.parse_args() | 732 args = parser.parse_args() |
| 733 | 733 |
| 734 if args.if_needed: | 734 if args.if_needed: |
| 735 is_clang_required = False | 735 is_clang_required = False |
| 736 # clang is always used on Mac and Linux. | 736 # clang is always used on Mac and Linux. |
| 737 if sys.platform == 'darwin' or sys.platform.startswith('linux'): | 737 if sys.platform == 'darwin' or sys.platform.startswith('linux'): |
| 738 is_clang_required = True | 738 is_clang_required = True |
| 739 # clang requested via $GYP_DEFINES. | 739 # clang requested via $GYP_DEFINES. |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 776 args.force_local_build = True | 776 args.force_local_build = True |
| 777 if 'OS=android' not in os.environ.get('GYP_DEFINES', ''): | 777 if 'OS=android' not in os.environ.get('GYP_DEFINES', ''): |
| 778 # Only build the Android ASan rt on ToT bots when targetting Android. | 778 # Only build the Android ASan rt on ToT bots when targetting Android. |
| 779 args.with_android = False | 779 args.with_android = False |
| 780 | 780 |
| 781 return UpdateClang(args) | 781 return UpdateClang(args) |
| 782 | 782 |
| 783 | 783 |
| 784 if __name__ == '__main__': | 784 if __name__ == '__main__': |
| 785 sys.exit(main()) | 785 sys.exit(main()) |
| OLD | NEW |