| OLD | NEW |
| 1 #!/usr/bin/python | 1 #!/usr/bin/python |
| 2 # Copyright 2014 The Chromium Authors. All rights reserved. | 2 # Copyright 2014 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 """ | 6 """ |
| 7 cr_cronet.py - cr - like helper tool for cronet developers | 7 cr_cronet.py - cr - like helper tool for cronet developers |
| 8 """ | 8 """ |
| 9 | 9 |
| 10 import argparse | 10 import argparse |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 | 74 |
| 75 options, extra_options_list = parser.parse_known_args() | 75 options, extra_options_list = parser.parse_known_args() |
| 76 print options | 76 print options |
| 77 print extra_options_list | 77 print extra_options_list |
| 78 | 78 |
| 79 is_os = (sys.platform == 'darwin') | 79 is_os = (sys.platform == 'darwin') |
| 80 if is_os: | 80 if is_os: |
| 81 target_os = 'ios' | 81 target_os = 'ios' |
| 82 test_target = 'cronet_test' | 82 test_target = 'cronet_test' |
| 83 gn_args = 'is_cronet_build=true is_component_build=false ' \ | 83 gn_args = 'is_cronet_build=true is_component_build=false ' \ |
| 84 'use_xcode_clang=true ' | 84 'use_xcode_clang=true enable_ios_bitcode=true ' |
| 85 gn_extra = '--ide=xcode' | 85 gn_extra = '--ide=xcode' |
| 86 if options.iphoneos: | 86 if options.iphoneos: |
| 87 gn_args += ' target_cpu="arm64" ' | 87 gn_args += ' target_cpu="arm64" ' |
| 88 out_dir_suffix = '-iphoneos' | 88 out_dir_suffix = '-iphoneos' |
| 89 else: | 89 else: |
| 90 gn_args += ' target_cpu="x64" ' | 90 gn_args += ' target_cpu="x64" ' |
| 91 out_dir_suffix = '-iphonesimulator' | 91 out_dir_suffix = '-iphonesimulator' |
| 92 if options.asan: | 92 if options.asan: |
| 93 gn_args += ' is_asan=true use_xcode_clang=true ' | 93 gn_args += ' is_asan=true use_xcode_clang=true ' |
| 94 out_dir_suffix += '-asan' | 94 out_dir_suffix += '-asan' |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 return test_ios(out_dir, extra_options) | 148 return test_ios(out_dir, extra_options) |
| 149 if (options.command=='build-test'): | 149 if (options.command=='build-test'): |
| 150 return build(out_dir, test_target) or test_ios(out_dir, extra_options) | 150 return build(out_dir, test_target) or test_ios(out_dir, extra_options) |
| 151 | 151 |
| 152 parser.print_help() | 152 parser.print_help() |
| 153 return 1 | 153 return 1 |
| 154 | 154 |
| 155 | 155 |
| 156 if __name__ == '__main__': | 156 if __name__ == '__main__': |
| 157 sys.exit(main()) | 157 sys.exit(main()) |
| OLD | NEW |