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