| OLD | NEW |
| 1 #!/usr/bin/python | 1 #!/usr/bin/python |
| 2 # Copyright 2016 The Chromium Authors. All rights reserved. | 2 # Copyright 2016 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 package_ios.py - Build and Package Release and Rebug fat libraries for iOS. | 7 package_ios.py - Build and Package Release and Rebug fat libraries for iOS. |
| 8 """ | 8 """ |
| 9 | 9 |
| 10 import argparse | 10 import argparse |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 build_dir = '' | 92 build_dir = '' |
| 93 for (build_config, gn_extra_args) in [('Debug', 'is_debug=true use_xcode_clang
=true'), | 93 for (build_config, gn_extra_args) in [('Debug', 'is_debug=true use_xcode_clang
=true'), |
| 94 ('Release', 'is_debug=false enable_stripping=true is_official_build=true
')]: | 94 ('Release', 'is_debug=false enable_stripping=true is_official_build=true
')]: |
| 95 for (target_device, target_cpu, additional_cpu) in [('os', 'arm', 'arm64'), | 95 for (target_device, target_cpu, additional_cpu) in [('os', 'arm', 'arm64'), |
| 96 ('simulator', 'x86', 'x64')]: | 96 ('simulator', 'x86', 'x64')]: |
| 97 target_dir = '%s-iphone%s' % (build_config, target_device) | 97 target_dir = '%s-iphone%s' % (build_config, target_device) |
| 98 build_dir = os.path.join("out", target_dir) | 98 build_dir = os.path.join("out", target_dir) |
| 99 gn_args = 'target_os="ios" enable_websockets=false ' \ | 99 gn_args = 'target_os="ios" enable_websockets=false ' \ |
| 100 'is_cronet_build=true is_component_build=false ' \ | 100 'is_cronet_build=true is_component_build=false ' \ |
| 101 'disable_file_support=true disable_ftp_support=true ' \ | 101 'disable_file_support=true disable_ftp_support=true ' \ |
| 102 'use_platform_icu_alternatives=true ' \ | 102 'use_platform_icu_alternatives=true enable_ios_bitcode=true ' \ |
| 103 'disable_brotli_filter=true enable_dsyms=true ' \ | 103 'disable_brotli_filter=true enable_dsyms=true ' \ |
| 104 'target_cpu="%s" additional_target_cpus = ["%s"] %s' % \ | 104 'target_cpu="%s" additional_target_cpus = ["%s"] %s' % \ |
| 105 (target_cpu, additional_cpu, gn_extra_args) | 105 (target_cpu, additional_cpu, gn_extra_args) |
| 106 | 106 |
| 107 print 'Generating Ninja ' + gn_args | 107 print 'Generating Ninja ' + gn_args |
| 108 gn_result = run('gn gen %s --args=\'%s\'' % (build_dir, gn_args)) | 108 gn_result = run('gn gen %s --args=\'%s\'' % (build_dir, gn_args)) |
| 109 if gn_result != 0: | 109 if gn_result != 0: |
| 110 return gn_result | 110 return gn_result |
| 111 | 111 |
| 112 print 'Building ' + build_dir | 112 print 'Building ' + build_dir |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 | 190 |
| 191 if options.gn: | 191 if options.gn: |
| 192 return package_ios_framework_using_gn(out_dir, extra_options_list) | 192 return package_ios_framework_using_gn(out_dir, extra_options_list) |
| 193 | 193 |
| 194 return package_ios(out_dir, "out/Release", "opt") or \ | 194 return package_ios(out_dir, "out/Release", "opt") or \ |
| 195 package_ios(out_dir, "out/Debug", "dbg") | 195 package_ios(out_dir, "out/Debug", "dbg") |
| 196 | 196 |
| 197 | 197 |
| 198 if __name__ == '__main__': | 198 if __name__ == '__main__': |
| 199 sys.exit(main()) | 199 sys.exit(main()) |
| OLD | NEW |