| 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 'debug', | 62 'debug', |
| 63 'build-debug']) | 63 'build-debug']) |
| 64 parser.add_argument('-r', '--release', action='store_true', | 64 parser.add_argument('-r', '--release', action='store_true', |
| 65 help='use release configuration') | 65 help='use release configuration') |
| 66 | 66 |
| 67 options, extra_options_list = parser.parse_known_args() | 67 options, extra_options_list = parser.parse_known_args() |
| 68 print options | 68 print options |
| 69 print extra_options_list | 69 print extra_options_list |
| 70 gyp_defines = 'GYP_DEFINES="OS=android enable_websockets=0 '+ \ | 70 gyp_defines = 'GYP_DEFINES="OS=android enable_websockets=0 '+ \ |
| 71 'disable_file_support=1 disable_ftp_support=1 '+ \ | 71 'disable_file_support=1 disable_ftp_support=1 '+ \ |
| 72 'enable_bidirectional_stream=1"' | 72 'enable_bidirectional_stream=1 enable_errorprone=1"' |
| 73 gn_args = 'target_os="android" enable_websockets=false '+ \ | 73 gn_args = 'target_os="android" enable_websockets=false '+ \ |
| 74 'disable_file_support=true disable_ftp_support=true '+ \ | 74 'disable_file_support=true disable_ftp_support=true '+ \ |
| 75 'enable_bidirectional_stream=false' | 75 'enable_bidirectional_stream=false use_errorprone_java_compiler=true' |
| 76 out_dir = 'out/Debug' | 76 out_dir = 'out/Debug' |
| 77 release_arg = '' | 77 release_arg = '' |
| 78 extra_options = ' '.join(extra_options_list) | 78 extra_options = ' '.join(extra_options_list) |
| 79 if options.release: | 79 if options.release: |
| 80 out_dir = 'out/Release' | 80 out_dir = 'out/Release' |
| 81 release_arg = ' --release' | 81 release_arg = ' --release' |
| 82 gn_args += ' is_debug=false ' | 82 gn_args += ' is_debug=false ' |
| 83 | 83 |
| 84 if (options.command=='gyp'): | 84 if (options.command=='gyp'): |
| 85 return run (gyp_defines + ' gclient runhooks') | 85 return run (gyp_defines + ' gclient runhooks') |
| (...skipping 18 matching lines...) Expand all Loading... |
| 104 return install(release_arg) or debug(extra_options) | 104 return install(release_arg) or debug(extra_options) |
| 105 if (options.command=='build-debug'): | 105 if (options.command=='build-debug'): |
| 106 return build(out_dir) or install(release_arg) or debug(extra_options) | 106 return build(out_dir) or install(release_arg) or debug(extra_options) |
| 107 | 107 |
| 108 parser.print_help() | 108 parser.print_help() |
| 109 return 1 | 109 return 1 |
| 110 | 110 |
| 111 | 111 |
| 112 if __name__ == '__main__': | 112 if __name__ == '__main__': |
| 113 sys.exit(main()) | 113 sys.exit(main()) |
| OLD | NEW |