Add build flag to enable bitcode on ios

BUG=webrtc:5085
NOTRY=true

Review-Url: https://codereview.webrtc.org/2478663002
Cr-Commit-Position: refs/heads/master@{#14997}
This commit is contained in:
kthelgason 2016-11-09 04:58:12 -08:00 committed by Commit bot
parent b04b5c205a
commit 592baaf89a
2 changed files with 30 additions and 2 deletions

24
webrtc/build/ios/BUILD.gn Normal file
View File

@ -0,0 +1,24 @@
# 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" ]
}
}

View File

@ -172,7 +172,7 @@ webrtc_root = get_path_info("../", "abspath")
# It sets defines, include paths and compilation warnings accordingly,
# both for WebRTC stand-alone builds and for the scenario when WebRTC
# native code is built as part of Chromium.
rtc_common_config = webrtc_root + ":common_config"
rtc_common_configs = [ webrtc_root + ":common_config" ]
# Global public configuration that should be applied to all WebRTC targets. You
# normally shouldn't need to include this in your target as it's automatically
@ -181,9 +181,13 @@ rtc_common_config = 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_config ]
rtc_add_configs = rtc_common_configs
set_defaults("rtc_test") {
configs = rtc_add_configs