From a5f267d5aced6e76404fc36f0bf26be468b69a14 Mon Sep 17 00:00:00 2001 From: Sylvain Defresne Date: Fri, 1 Jul 2022 16:24:47 +0200 Subject: [PATCH] [ios] Remove the support for bitcode MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit According to Xcode 14 documentation [1]: > Xcode no longer builds bitcode by default and generates a warning > message if a project explicitly enables bitcode: “Building with > bitcode is deprecated. Please update your project and/or target > settings to disable bitcode.” The capability to build with bitcode > will be removed in a future Xcode release. IPAs that contain bitcode > will have the bitcode stripped before being submitted to the App > Store. Debug symbols for past bitcode submissions remain available > for download. (86118779) [1]: https://developer.apple.com/documentation/Xcode-Release-Notes/xcode-14-release-notes Bug: webrtc:14237 Change-Id: I39fb618409e1978f8e7b42aa71208e00ed69d85f Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/267407 Reviewed-by: Mirko Bonadei Commit-Queue: Sylvain Defresne Cr-Commit-Position: refs/heads/main@{#37415} --- docs/native-code/ios/index.md | 10 ++-------- tools_webrtc/ios/build_ios_libs.py | 15 ++++----------- 2 files changed, 6 insertions(+), 19 deletions(-) diff --git a/docs/native-code/ios/index.md b/docs/native-code/ios/index.md index e95f967bf9..29db854e0c 100644 --- a/docs/native-code/ios/index.md +++ b/docs/native-code/ios/index.md @@ -2,9 +2,8 @@ ## Development Environment -In case you need to build the framework manually -(for instance if you need to support bitcode) or you want to try out the demo application -AppRTCMobile, follow the instructions illustrated bellow. +In case you need to build the framework manually or you want to try out the +demo application AppRTCMobile, follow the instructions illustrated bellow. A macOS machine is required for iOS development. While it's possible to develop purely from the command line with text editors, it's easiest to use @@ -170,11 +169,6 @@ If you need a FAT `.framework`, that is, a binary that contains code for multiple architectures, and will work both on device and in the simulator, a script is available [here][framework-script] -To build the framework with bitcode support, pass the `--bitcode` flag to the script like so - -``` -$ python tools_webrtc/ios/build_ios_libs.py --bitcode -``` The resulting framework can be found in out_ios_libs/. Please note that you can not ship the FAT framework binary with your app diff --git a/tools_webrtc/ios/build_ios_libs.py b/tools_webrtc/ios/build_ios_libs.py index 9a4c3e32ad..01a95b08c4 100755 --- a/tools_webrtc/ios/build_ios_libs.py +++ b/tools_webrtc/ios/build_ios_libs.py @@ -87,11 +87,6 @@ def _ParseArgs(): type=int, default=0, help='Specifies a revision number to embed if building the framework.') - parser.add_argument('-e', - '--bitcode', - action='store_true', - default=False, - help='Compile with bitcode.') parser.add_argument('--verbose', action='store_true', default=False, @@ -154,7 +149,7 @@ def _ParseArchitecture(architectures): def BuildWebRTC(output_dir, target_environment, target_arch, flavor, gn_target_name, ios_deployment_target, libvpx_build_vp9, - use_bitcode, use_goma, extra_gn_args): + use_goma, extra_gn_args): gn_args = [ 'target_os="ios"', 'ios_enable_code_signing=false', @@ -179,8 +174,7 @@ def BuildWebRTC(output_dir, target_environment, target_arch, flavor, gn_args.append('rtc_libvpx_build_vp9=' + ('true' if libvpx_build_vp9 else 'false')) - gn_args.append('enable_ios_bitcode=' + ('true' if use_bitcode else 'false')) - gn_args.append('use_lld=' + ('false' if use_bitcode else 'true')) + gn_args.append('use_lld=true') gn_args.append('use_goma=' + ('true' if use_goma else 'false')) gn_args.append('rtc_enable_objc_symbol_export=true') @@ -228,8 +222,7 @@ def main(): return 0 gn_target_name = 'framework_objc' - if not args.bitcode: - gn_args.append('enable_dsyms=true') + gn_args.append('enable_dsyms=true') gn_args.append('enable_stripping=true') # Build all architectures. @@ -244,7 +237,7 @@ def main(): lib_paths.append(lib_path) BuildWebRTC(lib_path, environment, arch, args.build_config, gn_target_name, IOS_DEPLOYMENT_TARGET[environment], - LIBVPX_BUILD_VP9, args.bitcode, args.use_goma, gn_args) + LIBVPX_BUILD_VP9, args.use_goma, gn_args) all_lib_paths.extend(lib_paths) # Combine the slices.