| Index: build/config/BUILDCONFIG.gn
|
| diff --git a/build/config/BUILDCONFIG.gn b/build/config/BUILDCONFIG.gn
|
| index 4f3a223c32d23ab7b79007add5081deac14bdf7e..679ddbd6c45202fde370e39ecef240029eca053a 100644
|
| --- a/build/config/BUILDCONFIG.gn
|
| +++ b/build/config/BUILDCONFIG.gn
|
| @@ -2,6 +2,15 @@
|
| # Use of this source code is governed by a BSD-style license that can be
|
| # found in the LICENSE file.
|
|
|
| +if (target_os == "ios") {
|
| + declare_args() {
|
| + # If defined, then the build is a multi-architecture build (aka fat build)
|
| + # and target_cpu must not be defined. Any value supported by target_cpu can
|
| + # be used in this list.
|
| + multi_arch_target_cpus = []
|
| + }
|
| +}
|
| +
|
| # =============================================================================
|
| # PLATFORM SELECTION
|
| # =============================================================================
|
| @@ -45,6 +54,18 @@ if (target_cpu == "") {
|
| # This allows us to not have to specify both target_os and target_cpu
|
| # on the command line.
|
| target_cpu = "arm"
|
| + } else if (target_os == "ios") {
|
| + # If we're building for iOS, we respect the multi_arch_target_cpus if
|
| + # it is defined. In that case, we pick the first architecture listed in
|
| + # multi_arch_target_cpus and use it as target_cpu, the others will be
|
| + # build as secondary toolchain by the ios_app_bundle target.
|
| + if (multi_arch_target_cpus != []) {
|
| + assert(target_cpu == "",
|
| + "cannot define both multi_arch_target_cpus and target_cpu")
|
| + target_cpu = multi_arch_target_cpus[0]
|
| + } else {
|
| + target_cpu = host_cpu
|
| + }
|
| } else {
|
| target_cpu = host_cpu
|
| }
|
| @@ -214,6 +235,14 @@ if (target_os == "android") {
|
| }
|
| } else if (target_os == "ios") {
|
| _default_toolchain = "//build/toolchain/mac:ios_clang_$target_cpu"
|
| + assert(custom_toolchain == "" || multi_arch_target_cpus == [],
|
| + "cannot define both multi_arch_target_cpus and custom_toolchain")
|
| +
|
| + multi_arch_toolchains = []
|
| + foreach(multi_arch_target_cpu, multi_arch_target_cpus) {
|
| + multi_arch_toolchains +=
|
| + [ "//build/toolchain/mac:ios_clang_$multi_arch_target_cpu" ]
|
| + }
|
| } else if (target_os == "linux") {
|
| if (is_clang) {
|
| _default_toolchain = "//build/toolchain/linux:clang_$target_cpu"
|
|
|