Chromium Code Reviews| Index: components/cronet/tools/package_ios.py |
| diff --git a/components/cronet/tools/package_ios.py b/components/cronet/tools/package_ios.py |
| index 829dec2edcfc792b431a6779ec1eb068da346d42..2e3c9094653a98fcaedc1e56143f7f8f6bc5d98e 100755 |
| --- a/components/cronet/tools/package_ios.py |
| +++ b/components/cronet/tools/package_ios.py |
| @@ -90,37 +90,42 @@ def package_ios_framework_using_gn(out_dir='out/Framework', extra_options=''): |
| # Package all builds in the output directory |
| os.makedirs(out_dir) |
| build_dir = '' |
| - for (build_config, gn_extra_args) in [('Debug', 'is_debug=true'), |
| - ('Release', 'is_debug=false enable_stripping=true')]: |
| - for (target_device, target_cpu, additional_cpu) in [('os', 'arm', 'arm64'), |
| - ('simulator', 'x86', 'x64')]: |
| - target_dir = '%s-iphone%s' % (build_config, target_device) |
| - build_dir = os.path.join("out", target_dir) |
| - gn_args = 'target_os="ios" enable_websockets=false ' \ |
| - 'is_cronet_build=true is_component_build=false ' \ |
| - 'disable_file_support=true disable_ftp_support=true ' \ |
| - 'use_platform_icu_alternatives=true ' \ |
| - 'disable_brotli_filter=true enable_dsyms=true ' \ |
| - 'target_cpu="%s" additional_target_cpus = ["%s"] %s' % \ |
|
mef
2017/04/11 21:05:09
Using |additional_target_cpus| fails for hide_symb
Hiroshi Ichikawa
2017/04/12 04:35:25
So far I build the library in multiple architectur
mef
2017/04/12 15:57:50
Thanks for the pointer! I'll give it a try if this
|
| - (target_cpu, additional_cpu, gn_extra_args) |
| - |
| - print 'Generating Ninja ' + gn_args |
| - gn_result = run('gn gen %s --args=\'%s\'' % (build_dir, gn_args)) |
| - if gn_result != 0: |
| - return gn_result |
| - |
| - print 'Building ' + build_dir |
| - build_result = run('ninja -C %s cronet_package' % build_dir, |
| - extra_options) |
| - if build_result != 0: |
| - return build_result |
| - |
| - # Copy framework. |
| - shutil.copytree(os.path.join(build_dir, 'Cronet.framework'), |
| - os.path.join(out_dir, target_dir, 'Cronet.framework')) |
| - # Copy symbols. |
| - shutil.copytree(os.path.join(build_dir, 'Cronet.dSYM'), |
| - os.path.join(out_dir, target_dir, 'Cronet.framework.dSYM')) |
| + for (build_config, gn_extra_args) in [('Release', 'is_debug=false enable_stripping=true'), |
| + ('Debug', 'is_debug=true'),]: |
| + for (target_device, target_cpus) in [('os', ['arm', 'arm64']), |
| + ('simulator', ['x64'])]: |
| + for target_cpu in target_cpus: |
| + target_dir = '%s-iphone%s-%s' % (build_config, target_device, target_cpu) |
| + build_dir = os.path.join("out", target_dir) |
| + gn_args = 'target_os="ios" enable_websockets=false ' \ |
| + 'is_cronet_build=true is_component_build=false ' \ |
| + 'disable_file_support=true disable_ftp_support=true ' \ |
| + 'use_platform_icu_alternatives=true ' \ |
| + 'disable_brotli_filter=true enable_dsyms=true ' \ |
| + 'target_cpu="%s" %s' % \ |
| + (target_cpu, gn_extra_args) |
| + |
| + print 'Generating Ninja ' + gn_args |
| + gn_result = run('gn gen %s --args=\'%s\'' % (build_dir, gn_args)) |
| + if gn_result != 0: |
| + return gn_result |
| + |
| + print 'Building ' + build_dir |
| + build_result = run('ninja -C %s cronet_package' % build_dir, |
| + extra_options) |
| + if build_result != 0: |
| + return build_result |
| + |
| + # Copy framework. |
| + shutil.copytree(os.path.join(build_dir, 'Cronet.framework'), |
| + os.path.join(out_dir, target_dir, 'Cronet.framework')) |
| + # Copy symbols. |
| + shutil.copytree(os.path.join(build_dir, 'Cronet.dSYM'), |
| + os.path.join(out_dir, target_dir, 'Cronet.framework.dSYM')) |
| + |
| + # Copy static library. |
| + shutil.copy2(os.path.join(build_dir, 'cronet', 'libcronet.a'), |
| + os.path.join(out_dir, target_dir)) |
| # Copy common files from last built package. |
| package_dir = os.path.join(build_dir, 'cronet') |