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

Side by Side Diff: build/config/ios/ios_sdk.gni

Issue 2123253004: Add support for multi-architecture application bundle on iOS. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add comment on how to use additional_target_cpus variable Created 4 years, 5 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 unified diff | Download patch
« no previous file with comments | « no previous file | build/config/ios/rules.gni » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2015 The Chromium Authors. All rights reserved. 1 # Copyright 2015 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 declare_args() { 5 declare_args() {
6 # SDK path to use. When empty this will use the default SDK based on the 6 # SDK path to use. When empty this will use the default SDK based on the
7 # value of use_ios_simulator. 7 # value of use_ios_simulator.
8 ios_sdk_path = "" 8 ios_sdk_path = ""
9 ios_sdk_name = "" 9 ios_sdk_name = ""
10 ios_sdk_version = "" 10 ios_sdk_version = ""
11 ios_sdk_platform = "" 11 ios_sdk_platform = ""
12 xcode_version = "" 12 xcode_version = ""
13 xcode_build = "" 13 xcode_build = ""
14 machine_os_build = "" 14 machine_os_build = ""
15 15
16 use_ios_simulator = target_cpu == "x86" || target_cpu == "x64" 16 use_ios_simulator = target_cpu == "x86" || target_cpu == "x64"
17 17
18 # Version of iOS that we're targeting. 18 # Version of iOS that we're targeting.
19 ios_deployment_target = "9.0" 19 ios_deployment_target = "9.0"
20 20
21 # The iOS Code signing identity to use 21 # The iOS Code signing identity to use
22 # TODO(GYP), TODO(sdfresne): Consider having a separate 22 # TODO(GYP), TODO(sdfresne): Consider having a separate
23 # ios_enable_code_signing_flag=<bool> flag to make the invocation clearer. 23 # ios_enable_code_signing_flag=<bool> flag to make the invocation clearer.
24 ios_enable_code_signing = true 24 ios_enable_code_signing = true
25 ios_code_signing_identity = "" 25 ios_code_signing_identity = ""
26
27 # If non-empty, this list must contain valid cpu architecture, and the final
28 # build will be a multi-architecture build (aka fat build) supporting the
29 # main $target_cpu architecture and all of $additional_target_cpus.
30 #
31 # For example to build an application that will run on both arm64 and armv7
32 # devices, you would use the following in args.gn file when running "gn args":
33 #
34 # target_os = "ios"
35 # target_cpu = "arm64"
36 # additional_target_cpus = [ "arm" ]
37 #
38 # You can also pass the value via "--args" parameter for "gn gen" command by
39 # using the syntax --args='additional_target_cpus=["arm"] target_cpu="arm64"'.
40 additional_target_cpus = []
41 }
42
43 assert(custom_toolchain == "" || additional_target_cpus == [],
44 "cannot define both custom_toolchain and additional_target_cpus")
45
46 # Initialize additional_toolchains from additional_target_cpus. Assert here
47 # that the list does not contains $target_cpu nor duplicates as this would
48 # cause weird errors during the build.
49 additional_toolchains = []
50 if (additional_target_cpus != []) {
51 foreach(_additional_target_cpu, additional_target_cpus) {
52 assert(_additional_target_cpu != target_cpu,
53 "target_cpu must not be listed in additional_target_cpus")
54
55 _toolchain = "//build/toolchain/mac:ios_clang_$_additional_target_cpu"
56 foreach(_additional_toolchain, additional_toolchains) {
57 assert(_toolchain != _additional_toolchain,
58 "additional_target_cpus must not contains duplicate values")
59 }
60
61 additional_toolchains += [ _toolchain ]
62 }
26 } 63 }
27 64
28 if (ios_sdk_path == "") { 65 if (ios_sdk_path == "") {
29 # Compute default target. 66 # Compute default target.
30 if (use_ios_simulator) { 67 if (use_ios_simulator) {
31 ios_sdk_name = "iphonesimulator" 68 ios_sdk_name = "iphonesimulator"
32 ios_sdk_platform = "iPhoneSimulator" 69 ios_sdk_platform = "iPhoneSimulator"
33 } else { 70 } else {
34 ios_sdk_name = "iphoneos" 71 ios_sdk_name = "iphoneos"
35 ios_sdk_platform = "iPhoneOS" 72 ios_sdk_platform = "iPhoneOS"
(...skipping 28 matching lines...) Expand all
64 ios_code_signing_identity = _ios_identities[0] 101 ios_code_signing_identity = _ios_identities[0]
65 } 102 }
66 103
67 if (ios_code_signing_identity == "") { 104 if (ios_code_signing_identity == "") {
68 print("Tried to prepare a device build without specifying a code signing") 105 print("Tried to prepare a device build without specifying a code signing")
69 print("identity and could not detect one automatically either.") 106 print("identity and could not detect one automatically either.")
70 print("TIP: Simulator builds don't require code signing...") 107 print("TIP: Simulator builds don't require code signing...")
71 assert(false) 108 assert(false)
72 } 109 }
73 } 110 }
OLDNEW
« no previous file with comments | « no previous file | build/config/ios/rules.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698