1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
build / toolchain / ios / BUILD.gn [blame]
# Copyright 2021 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build/config/ios/ios_sdk.gni")
import("//build/toolchain/apple/toolchain.gni")
# Specialisation of the apple_toolchain template to declare the toolchain
# and its tools to build target for iOS platform.
template("ios_toolchain") {
assert(defined(invoker.toolchain_args),
"Toolchains must declare toolchain_args")
apple_toolchain(target_name) {
forward_variables_from(invoker, "*", [ "toolchain_args" ])
sdk_developer_dir = ios_sdk_developer_dir
deployment_target = ios_deployment_target
target_environment = target_environment
bin_path = ios_bin_path
toolchain_args = {
forward_variables_from(invoker.toolchain_args, "*")
xcode_build = xcode_build
current_os = "ios"
}
}
}
# Specialisation of the ios_toolchain template to declare the toolchain
# and its tools to build application extension for iOS platform.
template("ios_app_ext_toolchain") {
assert(defined(invoker.toolchain_args),
"Toolchains must declare toolchain_args")
ios_toolchain(target_name) {
forward_variables_from(invoker, "*", [ "toolchain_args" ])
toolchain_args = {
forward_variables_from(invoker.toolchain_args, "*")
ios_is_app_extension = true
# Those variables are defined outside of //build and thus only exists
# when used as part of Chromium. Use build_with_chromium to check if
# they can be overridden safely. This prevents breaking third-party
# projects such as WebRTC that only uses //build but not //base.
if (build_with_chromium) {
use_partition_alloc = false
ios_partition_alloc_enabled = false
}
}
}
}
# Specialisation of the ios_toolchain template to declare the toolchain
# and its tools to build application extension for iOS platform.
template("ios_blink_app_ext_toolchain") {
assert(defined(invoker.toolchain_args),
"Toolchains must declare toolchain_args")
ios_toolchain(target_name) {
forward_variables_from(invoker, "*", [ "toolchain_args" ])
toolchain_args = {
forward_variables_from(invoker.toolchain_args, "*")
ios_is_app_extension = true
}
}
}
ios_toolchain("ios_clang_arm64") {
toolchain_args = {
current_cpu = "arm64"
}
}
ios_toolchain("ios_clang_arm64_16_0") {
toolchain_args = {
current_cpu = "arm64"
ios_deployment_target = "16.0"
}
}
ios_toolchain("ios_clang_x64") {
toolchain_args = {
current_cpu = "x64"
}
}
ios_toolchain("ios_clang_x64_16_0") {
toolchain_args = {
current_cpu = "x64"
ios_deployment_target = "16.0"
}
}
ios_app_ext_toolchain("ios_clang_arm64_app_ext") {
toolchain_args = {
current_cpu = "arm64"
}
}
ios_blink_app_ext_toolchain("ios_clang_arm64_blink_app_ext") {
toolchain_args = {
current_cpu = "arm64"
use_blink = true
}
}
ios_blink_app_ext_toolchain("ios_clang_x64_blink_app_ext") {
toolchain_args = {
current_cpu = "x64"
use_blink = true
}
}
ios_app_ext_toolchain("ios_clang_arm64_app_ext_13_4") {
toolchain_args = {
current_cpu = "arm64"
ios_deployment_target = "13.4"
}
}
ios_app_ext_toolchain("ios_clang_x64_app_ext") {
toolchain_args = {
current_cpu = "x64"
}
}
ios_app_ext_toolchain("ios_clang_x64_app_ext_13_4") {
toolchain_args = {
current_cpu = "x64"
ios_deployment_target = "13.4"
}
}
ios_toolchain("ios_clang_arm64_blink") {
toolchain_args = {
current_cpu = "arm64"
use_blink = true
}
}