This repository has been archived by the owner on Apr 3, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 212
/
.gn
339 lines (318 loc) · 11.1 KB
/
.gn
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
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
# This file is used by the GN meta build system to find the root of the source
# tree and to set startup options. For documentation on the values set in this
# file, run "gn help dotfile" at the command line.
# The location of the build configuration file.
buildconfig = "//build/config/BUILDCONFIG.gn"
# The secondary source root is a parallel directory tree where
# GN build files are placed when they can not be placed directly
# in the source tree, e.g. for third party source trees.
secondary_source = "//build/secondary/"
# These are the targets to check headers for by default. The files in targets
# matching these patterns (see "gn help label_pattern" for format) will have
# their includes checked for proper dependencies when you run either
# "gn check" or "gn gen --check".
check_targets = [
#"//apps/*", # Medium-hard.
"//ash/*",
"//base/*",
"//blimp/*",
"//blink/*",
"//breakpad/*",
"//build/*",
"//cc/*",
#"//chrome/*", # Epic number of errors.
"//chrome/app/*",
"//chrome/common/*",
"//chrome/installer/*",
"//chrome/third_party/mozilla_security_manager/*",
"//chrome/tools/*",
"//chrome/utility/*",
"//chromecast/*",
"//chromeos/*",
"//chrome_elf/*",
"//cloud_print/*",
"//components/*",
#"//content/*", # A whole lot of errors.
"//content/browser/*",
"//content/child/*",
"//content/common/*",
"//content/gpu/*",
"//content/ppapi_plugin/*",
"//content/public/*",
"//content/renderer/*",
#"//content/shell/*", # Needs Android fix, bug 597020.
#"//content/test/*", # A couple of errors left.
"//content/test:content_perftests",
"//content/test:content_site_isolation_browsertests",
"//content/test:content_test_mojo_bindings",
"//content/test:content_unittests",
"//content/test:test_support",
"//content/utility/*",
"//courgette/*",
"//crypto/*",
"//data/*",
"//dbus/*",
"//device/*",
#"//extensions/*", # Lots of errors.
"//gin/*",
"//google_apis/*",
"//google_update/*",
"//gpu/*",
"//ios/*",
"//ios_internal/*",
"//ipc/*",
#"//jingle/*",
"//mash/*",
#"//media/*", # Lots of errors.
#"//media/base/*",
#"//media/capture/*",
#"//media/cast/*",
#"//media/test/*",
"//media:media",
"//media:shared_memory_support",
"//media:media_unittests",
"//media:audio_unittests",
"//media:media_perftests",
"//media/audio/*",
"//media/blink/*",
"//media/cdm/*",
"//media/ffmpeg/*",
"//media/gpu/*",
"//media/midi/*",
"//media/mojo/*",
"mojo/*",
#"//native_client/*",
"//net/*",
#"//pdf/*", # Medium-hard.
#"//ppapi/*", # Lots of errors.
"//ppapi/examples/*",
"//printing/*",
#"//remoting/*", # Medium-hard.
"//rlz/*",
#"//sandbox/*", # Medium-hard.
"//sdch/*",
"//services/*",
"//skia/*",
"//sql/*",
"//storage/*",
"//sync/*",
"//testing/*",
#"//third_party/*", # May not ever want this.
"//third_party/hunspell/*",
"//third_party/kasko/*",
"//third_party/libaddressinput/*",
"//third_party/libphonenumber/*",
"//third_party/WebKit/Source/*",
"//tools/*",
#"//ui/*", # Work left on Chromeos w/ use_ozone. Some parts of UI that work:
"//ui/accessibility/*",
"//ui/android/*",
"//ui/app_list/*",
"//ui/arc/*",
"//ui/aura/*",
"//ui/aura_extra/*",
"//ui/base/*",
"//ui/chromeos/*",
"//ui/compositor/*",
"//ui/content_accelerators/*",
"//ui/display/*",
"//ui/events/*",
"//ui/file_manager/*",
"//ui/gfx/*",
"//ui/gl/*",
"//ui/keyboard/*",
"//ui/latency_info/*",
"//ui/login/*",
"//ui/message_center/*",
"//ui/mojo/*",
"//ui/native_theme/*",
"//ui/ozone/*",
"//ui/platform_window/*",
"//ui/resources/*",
"//ui/shell_dialogs/*",
"//ui/snapshot/*",
"//ui/strings/*",
"//ui/surface/*",
"//ui/touch_selection/*",
"//ui/views/*",
"//ui/views_content_client/*",
"//ui/web_dialogs/*",
"//ui/webui/*",
"//ui/wm/*",
"//url/*",
"//v8/*",
"//win8/*",
]
# These are the list of GN files that run exec_script. This whitelist exists
# to force additional review for new uses of exec_script, which is strongly
# discouraged.
#
# GYPI_TO_GN
#
# Most of these entries are for gypi_to_gn calls. We should not be adding new
# calls to this script in the build (see //build/gypi_to_gn.py for detailed
# advice). The only time you should be editing this list for gypi_to_gn
# purposes is when moving an existing call to a different place.
#
# PLEASE READ
#
# You should almost never need to add new exec_script calls. exec_script is
# slow, especially on Windows, and can cause confusing effects. Although
# individually each call isn't slow or necessarily very confusing, at the scale
# of our repo things get out of hand quickly. By strongly pushing back on all
# additions, we keep the build fast and clean. If you think you need to add a
# new call, please consider:
#
# - Do not use a script to check for the existance of a file or directory to
# enable a different mode. Instead, use GN build args to enable or disable
# functionality and set options. An example is checking for a file in the
# src-internal repo to see if the corresponding src-internal feature should
# be enabled. There are several things that can go wrong with this:
#
# - It's mysterious what causes some things to happen. Although in many cases
# such behavior can be conveniently automatic, GN optimizes for explicit
# and obvious behavior so people can more easily diagnose problems.
#
# - The user can't enable a mode for one build and not another. With GN build
# args, the user can choose the exact configuration of multiple builds
# using one checkout. But implicitly basing flags on the state of the
# checkout, this functionality is broken.
#
# - It's easy to get stale files. If for example the user edits the gclient
# to stop checking out src-internal (or any other optional thing), it's
# easy to end up with stale files still mysteriously triggering build
# conditions that are no longer appropriate (yes, this happens in real
# life).
#
# - Do not use a script to iterate files in a directory (glob):
#
# - This has the same "stale file" problem as the above discussion. Various
# operations can leave untracked files in the source tree which can cause
# surprising effects.
#
# - It becomes impossible to use "git grep" to find where a certain file is
# referenced. This operation is very common and people really do get
# confused when things aren't listed.
#
# - It's easy to screw up. One common case is a build-time script that packs
# up a directory. The author notices that the script isn't re-run when the
# directory is updated, so adds a glob so all the files are listed as
# inputs. This seems to work great... until a file is deleted. When a
# file is deleted, all the inputs the glob lists will still be up to date
# and no command-lines will have been changed. The action will not be
# re-run and the build will be broken. It is possible to get this correct
# using glob, and it's possible to mess it up without glob, but globs make
# this situation much easier to create. if the build always lists the
# files and passes them to a script, it will always be correct.
exec_script_whitelist = [
"//android_webview/BUILD.gn",
"//ash/BUILD.gn",
"//build/config/BUILD.gn",
"//build/config/android/config.gni",
"//build/config/android/internal_rules.gni",
"//build/config/android/rules.gni",
"//build/config/compiler/BUILD.gn",
"//build/config/gcc/gcc_version.gni",
"//build/config/ios/ios_sdk.gni",
"//build/config/linux/BUILD.gn",
"//build/config/linux/pkg_config.gni",
"//build/config/linux/atk/BUILD.gn",
"//build/config/mac/mac_sdk.gni",
"//build/config/posix/BUILD.gn",
"//build/config/sysroot.gni",
"//build/config/win/BUILD.gn",
"//build/config/win/visual_studio_version.gni",
"//build/gn_helpers.py",
"//build/gypi_to_gn.py",
"//build/toolchain/concurrent_links.gni",
"//build/toolchain/mac/BUILD.gn",
"//build/toolchain/nacl/BUILD.gn",
"//build/toolchain/win/BUILD.gn",
"//build/util/branding.gni",
"//build/util/version.gni",
"//chrome/android/BUILD.gn",
"//chrome/browser/BUILD.gn",
"//chrome/browser/chromeos/BUILD.gn",
"//chrome/browser/extensions/BUILD.gn",
"//chrome/browser/resources/chromeos/chromevox/BUILD.gn",
"//chrome/browser/media/router/BUILD.gn",
"//chrome/browser/ui/BUILD.gn",
"//chrome/chrome_tests.gni",
"//chrome/common/BUILD.gn",
"//chrome/common/extensions/api/schemas.gni",
"//chrome/renderer/BUILD.gn",
"//chrome/test/BUILD.gn",
"//chrome/utility/BUILD.gn",
"//chromeos/BUILD.gn",
# TODO(dgn): Layer violation but breaks the build otherwise, see
# https://crbug.com/474506
"//clank/java/BUILD.gn",
"//clank/native/BUILD.gn",
"//components/domain_reliability/BUILD.gn",
"//content/browser/browser.gni",
"//content/child/child.gni",
"//content/common/common.gni",
"//content/public/android/BUILD.gn",
"//content/renderer/renderer.gni",
"//content/test/BUILD.gn",
"//content/utility/utility.gni",
"//extensions/common/api/schemas.gni",
"//extensions/extensions.gni",
"//extensions/shell/app_shell.gni",
"//extensions/shell/common/api/schemas.gni",
"//google_apis/BUILD.gn",
"//gpu/gles2_conform_support/BUILD.gn",
"//gpu/khronos_glcts_support/BUILD.gn",
"//jingle/BUILD.gn",
"//net/BUILD.gn",
"//ppapi/ppapi_sources.gni",
"//printing/BUILD.gn",
"//remoting/host/BUILD.gn",
"//remoting/remoting_srcs.gni",
"//remoting/remoting_version.gni",
"//skia/BUILD.gn",
"//sync/protocol/protocol_sources.gni",
"//third_party/android_platform/BUILD.gn",
"//third_party/angle/BUILD.gn",
"//third_party/angle/src/tests/BUILD.gn",
"//third_party/boringssl/BUILD.gn",
"//third_party/catapult/tracing/BUILD.gn",
"//third_party/cld_2/BUILD.gn",
"//third_party/cython/rules.gni",
"//third_party/google_input_tools/inputview.gni",
"//third_party/harfbuzz-ng/BUILD.gn",
"//third_party/libaddressinput/BUILD.gn",
"//third_party/opus/BUILD.gn",
"//third_party/openh264/BUILD.gn",
"//third_party/WebKit/Source/bindings/bindings.gni",
"//third_party/WebKit/Source/bindings/scripts/scripts.gni",
"//third_party/WebKit/Source/config.gni",
"//third_party/WebKit/Source/core/core.gni",
"//third_party/WebKit/Source/devtools/BUILD.gn",
"//third_party/WebKit/Source/modules/modules.gni",
"//third_party/WebKit/Source/platform/BUILD.gn",
"//third_party/WebKit/Source/platform/platform.gni",
"//third_party/WebKit/Source/web/BUILD.gn",
"//third_party/WebKit/Source/wtf/BUILD.gn",
"//third_party/WebKit/public/BUILD.gn",
"//tools/gn/BUILD.gn",
"//tools/gn/build_settings.h",
"//tools/gn/command_help.cc",
"//tools/gn/docs/language.md",
"//tools/gn/format_test_data/053.gn",
"//tools/gn/format_test_data/053.golden",
"//tools/gn/format_test_data/055.gn",
"//tools/gn/format_test_data/055.golden",
"//tools/gn/function_exec_script.cc",
"//tools/gn/gn.gyp",
"//tools/gn/input_conversion.cc",
"//tools/gn/misc/emacs/gn.el",
"//tools/gn/misc/vim/syntax/gn.vim",
"//tools/gn/setup.cc",
"//ui/accessibility/BUILD.gn",
"//ui/views/BUILD.gn",
"//ui/views/mus/BUILD.gn",
"//v8/test/cctest/BUILD.gn",
"//v8/test/unittests/BUILD.gn",
"//xwalk/build/version.gni",
]