| OLD | NEW |
| 1 #!/usr/bin/python | 1 #!/usr/bin/python |
| 2 # Copyright 2017 The Chromium Authors. All rights reserved. | 2 # Copyright 2017 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 Builds and packages CronetChromeWebView.framework. | 7 Builds and packages CronetChromeWebView.framework. |
| 8 """ | 8 """ |
| 9 | 9 |
| 10 import argparse | 10 import argparse |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 build_config_gn_args = 'is_debug=true' | 45 build_config_gn_args = 'is_debug=true' |
| 46 else: | 46 else: |
| 47 build_config_gn_args = ('is_debug=false enable_stripping=true ' | 47 build_config_gn_args = ('is_debug=false enable_stripping=true ' |
| 48 'is_official_build=true') | 48 'is_official_build=true') |
| 49 | 49 |
| 50 build_dir = os.path.join("out", target_dir_name(build_config, target_device)) | 50 build_dir = os.path.join("out", target_dir_name(build_config, target_device)) |
| 51 gn_args = ('target_os="ios" enable_websockets=false ' | 51 gn_args = ('target_os="ios" enable_websockets=false ' |
| 52 'is_component_build=false use_xcode_clang=true ' | 52 'is_component_build=false use_xcode_clang=true ' |
| 53 'disable_file_support=true disable_ftp_support=true ' | 53 'disable_file_support=true disable_ftp_support=true ' |
| 54 'disable_brotli_filter=true ios_enable_code_signing=false ' | 54 'disable_brotli_filter=true ios_enable_code_signing=false ' |
| 55 'enable_dsyms=true ' |
| 55 'target_cpu="%s" additional_target_cpus = ["%s"] %s %s' % | 56 'target_cpu="%s" additional_target_cpus = ["%s"] %s %s' % |
| 56 (target_cpu, additional_cpu, build_config_gn_args, | 57 (target_cpu, additional_cpu, build_config_gn_args, |
| 57 extra_gn_options)) | 58 extra_gn_options)) |
| 58 | 59 |
| 59 gn_command = 'gn gen %s --args=\'%s\'' % (build_dir, gn_args) | 60 gn_command = 'gn gen %s --args=\'%s\'' % (build_dir, gn_args) |
| 60 print gn_command | 61 print gn_command |
| 61 gn_result = os.system(gn_command) | 62 gn_result = os.system(gn_command) |
| 62 if gn_result != 0: | 63 if gn_result != 0: |
| 63 return gn_result | 64 return gn_result |
| 64 | 65 |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 print >>sys.stderr, 'The output directory already exists: ' + out_dir | 176 print >>sys.stderr, 'The output directory already exists: ' + out_dir |
| 176 return 1 | 177 return 1 |
| 177 | 178 |
| 178 gn_options = '' if options.no_goma else 'use_goma=true' | 179 gn_options = '' if options.no_goma else 'use_goma=true' |
| 179 | 180 |
| 180 return package_all_frameworks(out_dir, gn_options) | 181 return package_all_frameworks(out_dir, gn_options) |
| 181 | 182 |
| 182 | 183 |
| 183 if __name__ == '__main__': | 184 if __name__ == '__main__': |
| 184 sys.exit(main()) | 185 sys.exit(main()) |
| OLD | NEW |