From 0fc04b74c5f358e3891b34eaf0c8e580f087a8b3 Mon Sep 17 00:00:00 2001 From: VladimirTechMan Date: Fri, 20 Jan 2017 08:01:36 -0800 Subject: [PATCH] Finalize the support for building WebRTC library for iOS with bitcode MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Initial provisioning was already done in build_ios_libs.sh to support building the WebRTC framework or static library for iOS (tvOS, watchOS) with bitcode. Still, the actual build configuration would need to be modified for each and every part of the build, including 3rd-party libs. Thus, doing that more universally, at the build/config level, would be desirable – and actually necessary to provide the intended support. The patch for enhancing the Chromium build configs with that specific option was landed in https://codereview.chromium.org/2631573002 NOTRY=True BUG=webrtc:5085 Review-Url: https://codereview.webrtc.org/2633643003 Cr-Commit-Position: refs/heads/master@{#16193} --- webrtc/build/ios/BUILD.gn | 24 ------------------------ webrtc/build/ios/build_ios_libs.sh | 4 ++-- webrtc/build/webrtc.gni | 4 ---- 3 files changed, 2 insertions(+), 30 deletions(-) delete mode 100644 webrtc/build/ios/BUILD.gn diff --git a/webrtc/build/ios/BUILD.gn b/webrtc/build/ios/BUILD.gn deleted file mode 100644 index 219617cb17..0000000000 --- a/webrtc/build/ios/BUILD.gn +++ /dev/null @@ -1,24 +0,0 @@ -# Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. -# -# Use of this source code is governed by a BSD-style license -# that can be found in the LICENSE file in the root of the source -# tree. An additional intellectual property rights grant can be found -# in the file PATENTS. All contributing project authors may -# be found in the AUTHORS file in the root of the source tree. - -# This file is only meant to be included on iOS. -assert(is_ios) - -declare_args() { - # Enabling this option makes clang compile to an intermediate - # representation, and not to native code. This is preferred when - # including WebRTC in apps that will be sent to Apple's App Store - # and required for apps that run on watchOS or tvOS. - rtc_ios_enable_bitcode = false -} - -config("rtc_ios_common_config") { - if (rtc_ios_enable_bitcode) { - cflags = [ "-fembed-bitcode" ] - } -} diff --git a/webrtc/build/ios/build_ios_libs.sh b/webrtc/build/ios/build_ios_libs.sh index 1b659b5707..a483385af5 100755 --- a/webrtc/build/ios/build_ios_libs.sh +++ b/webrtc/build/ios/build_ios_libs.sh @@ -61,7 +61,7 @@ use_xcode_clang=true is_component_build=false" GN_ARGS="${GN_ARGS} rtc_libvpx_build_vp9=${libvpx_build_vp9}" # Add bitcode option. - GN_ARGS="${GN_ARGS} rtc_ios_enable_bitcode=${use_bitcode}" + GN_ARGS="${GN_ARGS} enable_ios_bitcode=${use_bitcode}" # Add custom options. if [[ -n "${custom_gn_options}" ]]; then @@ -119,7 +119,7 @@ CUSTOM_GN_OPTS="" WEBRTC_REVISION="0" # Parse arguments. -while getopts "hb:co:r:" opt; do +while getopts "hb:co:r:e" opt; do case "${opt}" in h) usage;; b) BUILD_TYPE="${OPTARG}";; diff --git a/webrtc/build/webrtc.gni b/webrtc/build/webrtc.gni index 45d2ec5712..edbd15359e 100644 --- a/webrtc/build/webrtc.gni +++ b/webrtc/build/webrtc.gni @@ -195,10 +195,6 @@ rtc_common_configs = [ webrtc_root + ":common_config" ] # depending on the target having this config. rtc_common_inherited_config = webrtc_root + ":common_inherited_config" -if (is_ios) { - rtc_common_configs += [ webrtc_root + "/build/ios:rtc_ios_common_config" ] -} - # Common configs to remove or add in all rtc targets. rtc_remove_configs = [] rtc_add_configs = rtc_common_configs