Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(186)

Unified Diff: components/cronet/tools/package_ios.py

Issue 2807283002: [Cronet] Build static libcronet.a for iOS with complete dependencies. (Closed)
Patch Set: Change package_ios.py to build per architecture and skip x86. Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/cronet/tools/hide_symbols.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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')
« no previous file with comments | « components/cronet/tools/hide_symbols.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698