| 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 829 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 840 help='build LLVM Gold plugin with LTO') | 840 help='build LLVM Gold plugin with LTO') |
| 841 parser.add_argument('--llvm-force-head-revision', action='store_true', | 841 parser.add_argument('--llvm-force-head-revision', action='store_true', |
| 842 help=('use the revision in the repo when printing ' | 842 help=('use the revision in the repo when printing ' |
| 843 'the revision')) | 843 'the revision')) |
| 844 parser.add_argument('--print-revision', action='store_true', | 844 parser.add_argument('--print-revision', action='store_true', |
| 845 help='print current clang revision and exit.') | 845 help='print current clang revision and exit.') |
| 846 parser.add_argument('--print-clang-version', action='store_true', | 846 parser.add_argument('--print-clang-version', action='store_true', |
| 847 help='print current clang version (e.g. x.y.z) and exit.') | 847 help='print current clang version (e.g. x.y.z) and exit.') |
| 848 parser.add_argument('--run-tests', action='store_true', | 848 parser.add_argument('--run-tests', action='store_true', |
| 849 help='run tests after building; only for local builds') | 849 help='run tests after building; only for local builds') |
| 850 parser.add_argument('--extra-tools', '--tools', nargs='*', | 850 parser.add_argument('--extra-tools', '--tools', nargs='*', default=[], |
| 851 help='select additional chrome tools to build') | 851 help='select additional chrome tools to build') |
| 852 parser.add_argument('--without-android', action='store_false', | 852 parser.add_argument('--without-android', action='store_false', |
| 853 help='don\'t build Android ASan runtime (linux only)', | 853 help='don\'t build Android ASan runtime (linux only)', |
| 854 dest='with_android', | 854 dest='with_android', |
| 855 default=sys.platform.startswith('linux')) | 855 default=sys.platform.startswith('linux')) |
| 856 args = parser.parse_args() | 856 args = parser.parse_args() |
| 857 | 857 |
| 858 if args.lto_gold_plugin and not args.bootstrap: | 858 if args.lto_gold_plugin and not args.bootstrap: |
| 859 print '--lto-gold-plugin requires --bootstrap' | 859 print '--lto-gold-plugin requires --bootstrap' |
| 860 return 1 | 860 return 1 |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 907 args.force_local_build = True | 907 args.force_local_build = True |
| 908 if 'OS=android' not in os.environ.get('GYP_DEFINES', ''): | 908 if 'OS=android' not in os.environ.get('GYP_DEFINES', ''): |
| 909 # Only build the Android ASan rt on ToT bots when targetting Android. | 909 # Only build the Android ASan rt on ToT bots when targetting Android. |
| 910 args.with_android = False | 910 args.with_android = False |
| 911 | 911 |
| 912 return UpdateClang(args) | 912 return UpdateClang(args) |
| 913 | 913 |
| 914 | 914 |
| 915 if __name__ == '__main__': | 915 if __name__ == '__main__': |
| 916 sys.exit(main()) | 916 sys.exit(main()) |
| OLD | NEW |