| 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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 'is_component_build=false ' + \ | 105 'is_component_build=false ' + \ |
| 106 'ignore_elf32_limitations=true use_partition_alloc=false' | 106 'ignore_elf32_limitations=true use_partition_alloc=false' |
| 107 | 107 |
| 108 extra_options = ' '.join(extra_options_list) | 108 extra_options = ' '.join(extra_options_list) |
| 109 if options.gn: | 109 if options.gn: |
| 110 out_dir_suffix += "-gn" | 110 out_dir_suffix += "-gn" |
| 111 | 111 |
| 112 if options.release: | 112 if options.release: |
| 113 out_dir = 'out/Release' + out_dir_suffix | 113 out_dir = 'out/Release' + out_dir_suffix |
| 114 release_arg = ' --release' | 114 release_arg = ' --release' |
| 115 gn_args += ' is_debug=false ' | 115 gn_args += ' is_debug=false is_official_build=true ' |
| 116 else: | 116 else: |
| 117 out_dir = 'out/Debug' + out_dir_suffix | 117 out_dir = 'out/Debug' + out_dir_suffix |
| 118 release_arg = '' | 118 release_arg = '' |
| 119 | 119 |
| 120 if options.out_dir: | 120 if options.out_dir: |
| 121 out_dir = options.out_dir | 121 out_dir = options.out_dir |
| 122 | 122 |
| 123 if (options.command=='gn'): | 123 if (options.command=='gn'): |
| 124 return run ('gn gen %s --args=\'%s\' %s' % (out_dir, gn_args, gn_extra)) | 124 return run ('gn gen %s --args=\'%s\' %s' % (out_dir, gn_args, gn_extra)) |
| 125 if (options.command=='sync'): | 125 if (options.command=='sync'): |
| (...skipping 22 matching lines...) Expand all 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 |