Upload upstream chromium 73.0.3683.0
[platform/framework/web/chromium-efl.git] / .gn
1 # This file is used by the GN meta build system to find the root of the source
2 # tree and to set startup options. For documentation on the values set in this
3 # file, run "gn help dotfile" at the command line.
4
5 import("//build/dotfile_settings.gni")
6 import("//third_party/angle/dotfile_settings.gni")
7
8 # The location of the build configuration file.
9 buildconfig = "//build/config/BUILDCONFIG.gn"
10
11 # The secondary source root is a parallel directory tree where
12 # GN build files are placed when they can not be placed directly
13 # in the source tree, e.g. for third party source trees.
14 secondary_source = "//build/secondary/"
15
16 # These arguments override the default values for items in a declare_args
17 # block. "gn args" in turn can override these.
18 #
19 # In general the value for a build arg in the declare_args block should be the
20 # default. In some cases, a DEPS-ed in project will want different defaults for
21 # being built as part of Chrome vs. being built standalone. In this case, the
22 # Chrome defaults should go here. There should be no overrides here for
23 # values declared in the main Chrome repository.
24 #
25 # Important note for defining defaults: This file is executed before the
26 # BUILDCONFIG.gn file. That file sets up the global variables like "is_ios".
27 # This means that the default_args can not depend on the platform,
28 # architecture, or other build parameters. If you really need that, the other
29 # repo should define a flag that toggles on a behavior that implements the
30 # additional logic required by Chrome to set the variables.
31 default_args = {
32   # TODO(brettw) bug 684096: Chrome on iOS does not build v8, so "gn gen" prints
33   # a warning that "Build argument has no effect". When adding a v8 variable, it
34   # also needs to be defined to src/ios/BUILD.gn (respectively removed from both
35   # location when it is removed).
36
37   v8_extra_library_files = [
38     # Dependencies used by the extra libraries. Putting them here causes them
39     # to be executed first during snapshot creation.
40     "//third_party/blink/renderer/core/streams/CommonOperations.js",
41     "//third_party/blink/renderer/core/streams/CommonStrings.js",
42     "//third_party/blink/renderer/core/streams/SimpleQueue.js",
43
44     # Extra libraries.
45     "//third_party/blink/renderer/core/streams/ByteLengthQueuingStrategy.js",
46     "//third_party/blink/renderer/core/streams/CountQueuingStrategy.js",
47     "//third_party/blink/renderer/core/streams/ReadableStream.js",
48     "//third_party/blink/renderer/core/streams/WritableStream.js",
49     "//third_party/blink/renderer/core/streams/TransformStream.js",
50   ]
51   v8_experimental_extra_library_files = []
52   v8_enable_gdbjit = false
53   v8_imminent_deprecation_warnings = false
54
55   # TODO(jochen): Remove this. http://crbug.com/v8/5830,
56   # http://crbug.com/728583.
57   v8_check_microtasks_scopes_consistency = false
58
59   # Don't include webrtc's builtin task queue implementation.
60   rtc_link_task_queue_impl = false
61
62   # Don't include the iLBC audio codec.
63   # TODO(bugs.webrtc.org/8396): Once WebRTC gets rid of its internal
64   # deps on codecs, we can remove this.
65   rtc_include_ilbc = false
66
67   # Changes some setup for the Crashpad build to set them to build against
68   # Chromium's zlib, base, etc.
69   crashpad_dependencies = "chromium"
70 }
71
72 # These are the targets to check headers for by default. The files in targets
73 # matching these patterns (see "gn help label_pattern" for format) will have
74 # their includes checked for proper dependencies when you run either
75 # "gn check" or "gn gen --check".
76 check_targets = [
77   "//apps/*",
78   "//ash/*",
79   "//base/*",
80   "//blink/*",
81   "//build/*",
82   "//cc/*",
83
84   #"//chrome/android/*",  # 13 errors
85   "//chrome/app/*",
86   "//chrome/app_shim/*",
87
88   #"//chrome/browser/*",  # ~1300 errors
89   #"//chrome/browser:*",  # ~600 errors
90   "//chrome/browser/accessibility/*",
91   "//chrome/browser/android/*",
92   "//chrome/browser/app_mode/*",
93   "//chrome/browser/apps/*",
94   "//chrome/browser/assist_ranker/*",
95   "//chrome/browser/autocomplete/*",
96   "//chrome/browser/autofill/*",
97   "//chrome/browser/background/*",
98   "//chrome/browser/background_fetch/*",
99   "//chrome/browser/background_sync/*",
100   "//chrome/browser/banners/*",
101   "//chrome/browser/bitmap_fetcher/*",
102   "//chrome/browser/bookmarks/*",
103   "//chrome/browser/browsing_data/*",
104   "//chrome/browser/budget_service/*",
105   "//chrome/browser/captive_portal/*",
106   "//chrome/browser/chooser_controller/*",
107   "//chrome/browser/chromeos/*",
108   "//chrome/browser/client_hints/*",
109   "//chrome/browser/clipboard/*",
110   "//chrome/browser/component_updater/*",
111   "//chrome/browser/conflicts/*",
112   "//chrome/browser/consent_auditor/*",
113   "//chrome/browser/content_settings/*",
114   "//chrome/browser/crash_upload_list/*",
115   "//chrome/browser/custom_handlers/*",
116   "//chrome/browser/data_saver/*",
117   "//chrome/browser/data_use_measurement/*",
118   "//chrome/browser/dbus/*",
119
120   #"//chrome/browser/devtools/*",  # 93 errors
121   "//chrome/browser/diagnostics/*",
122   "//chrome/browser/domain_reliability/*",
123   "//chrome/browser/dom_distiller/*",
124   "//chrome/browser/downgrade/*",
125   "//chrome/browser/download/*",
126   "//chrome/browser/drive/*",
127   "//chrome/browser/engagement/*",
128   "//chrome/browser/extensions/*",
129   "//chrome/browser/external_protocol/*",
130   "//chrome/browser/favicon/*",
131   "//chrome/browser/feature_engagement/*",
132   "//chrome/browser/feedback/*",
133   "//chrome/browser/first_run/*",
134   "//chrome/browser/gcm/*",
135   "//chrome/browser/generic_sensor/*",
136   "//chrome/browser/geolocation/*",
137   "//chrome/browser/google/*",
138   "//chrome/browser/gpu/*",
139   "//chrome/browser/guest_view/*",
140   "//chrome/browser/hang_monitor/*",
141   "//chrome/browser/history/*",
142   "//chrome/browser/importer/*",
143   "//chrome/browser/infobars/*",
144   "//chrome/browser/installable/*",
145   "//chrome/browser/install_verification/*",
146   "//chrome/browser/internal/*",
147   "//chrome/browser/interstitials/*",
148   "//chrome/browser/invalidation/*",
149   "//chrome/browser/language/*",
150   "//chrome/browser/lifetime/*",
151
152   #"//chrome/browser/loader/*",  # 2 errors
153   "//chrome/browser/local_discovery/*",
154   "//chrome/browser/mac/*",
155
156   #"//chrome/browser/media/*",  # 74 errors
157   "//chrome/browser/media_galleries/*",
158   "//chrome/browser/memory/*",
159   "//chrome/browser/metrics/*",
160   "//chrome/browser/nacl_host/*",
161   "//chrome/browser/navigation_predictor/*",
162   "//chrome/browser/net/*",
163   "//chrome/browser/notifications/*",
164   "//chrome/browser/ntp_snippets/*",
165   "//chrome/browser/ntp_tiles/*",
166   "//chrome/browser/obsolete_system/*",
167   "//chrome/browser/offline_items_collection/*",
168   "//chrome/browser/offline_pages/*",
169   "//chrome/browser/page_load_metrics/*",
170   "//chrome/browser/password_manager/*",
171   "//chrome/browser/payments/*",
172   "//chrome/browser/pdf/*",
173   "//chrome/browser/performance_monitor/*",
174   "//chrome/browser/permissions/*",
175   "//chrome/browser/picture_in_picture/*",
176   "//chrome/browser/plugins/*",
177
178   # "//chrome/browser/policy/*",  # 1 error on Windows
179   "//chrome/browser/predictors/*",
180   "//chrome/browser/prefetch/*",
181   "//chrome/browser/prefs/*",
182   "//chrome/browser/prerender/*",
183   "//chrome/browser/previews/*",
184   "//chrome/browser/printing/*",
185   "//chrome/browser/profile_resetter/*",
186   "//chrome/browser/profiles/*",
187
188   #"//chrome/browser/profiling_host/*",  # 16 errors
189   "//chrome/browser/push_messaging/*",
190   "//chrome/browser/recovery/*",
191   "//chrome/browser/renderer_context_menu/*",
192   "//chrome/browser/renderer_host/*",
193   "//chrome/browser/resource_coordinator/*",
194
195   #"//chrome/browser/resources/*",  # 18 errors on ChromeOS
196   "//chrome/browser/rlz/*",
197
198   #"//chrome/browser/safe_browsing/*",  # 239 errors
199   "//chrome/browser/search/*",
200   "//chrome/browser/search_engines/*",
201   "//chrome/browser/search_provider_logos/*",
202   "//chrome/browser/service_process/*",
203   "//chrome/browser/sessions/*",
204   "//chrome/browser/signin/*",
205   "//chrome/browser/speech/*",
206   "//chrome/browser/spellchecker/*",
207   "//chrome/browser/ssl/*",
208   "//chrome/browser/status_icons/*",
209   "//chrome/browser/storage/*",
210   "//chrome/browser/subresource_filter/*",
211   "//chrome/browser/supervised_user/*",
212   "//chrome/browser/sync/*",
213   "//chrome/browser/sync_file_system/*",
214   "//chrome/browser/tab_contents/*",
215   "//chrome/browser/task_manager/*",
216   "//chrome/browser/themes/*",
217   "//chrome/browser/thumbnails/*",
218   "//chrome/browser/tracing/*",
219   "//chrome/browser/translate/*",
220   "//chrome/browser/ui/*",
221   "//chrome/browser/undo/*",
222   "//chrome/browser/unified_consent/*",
223   "//chrome/browser/update_client/*",
224   "//chrome/browser/upgrade_detector/*",
225   "//chrome/browser/usb/*",
226   "//chrome/browser/vr/*",
227   "//chrome/browser/web_applications/*",
228   "//chrome/browser/webauthn/*",
229   "//chrome/browser/webshare/*",
230   "//chrome/browser/win/*",
231
232   "//chrome/build/*",
233
234   #"//chrome/child/*",  # 1 error on Windows
235   "//chrome/chrome_cleaner/*",
236
237   #"//chrome/chrome_watcher/*",  # 3 errors on Windows
238   "//chrome/common/*",
239
240   #"//chrome/elevation_service/*",  # 1 error on Windows
241   #"//chrome/gpu/*",  # 7 errors
242   "//chrome/installer/*",
243
244   #"//chrome/install_static/*",  # 8 errors on Windows
245   "//chrome/nacl/*",
246
247   #"//chrome/notification_helper/*",  # 4 errors on Windows
248   #"//chrome/renderer/*",  # ~30 errors
249   #"//chrome/service/*",  # 2 errors
250   #"//chrome/services/*",  # ~30 errors
251   #"//chrome/test/*",  # ~3000 errors
252   "//chrome/third_party/*",
253   "//chrome/tools/*",
254   "//chrome/utility/*",
255
256   "//chromecast/*",
257   "//chromeos/*",
258   "//chrome_elf/*",
259   "//cloud_print/*",
260   "//components/*",
261   "//content/*",
262   "//courgette/*",
263   "//crypto/*",
264   "//data/*",
265   "//dbus/*",
266   "//device/*",
267
268   #"//extensions/*",  # Lots of errors.
269   "//extensions:extensions_resources",
270   "//extensions:extensions_browsertests",
271   "//extensions:extensions_unittests",
272   "//extensions/browser",
273   "//extensions/browser:browser_tests",
274   "//extensions/browser:unit_tests",
275   "//extensions/browser/install:*",
276   "//extensions/common/*",
277   "//extensions/components/javascript_dialog_extensions_client",
278   "//extensions/components/native_app_window",
279   "//extensions/renderer:unit_tests",
280   "//extensions/shell/*",
281   "//extensions/strings/*",
282   "//fuchsia/*",
283   "//gin/*",
284   "//google_apis/*",
285   "//google_update/*",
286   "//gpu/*",
287
288   "//ios/*",
289   "//ios_internal/*",
290   "//ipc/*",
291
292   #"//jingle/*",
293   "//mash/*",
294
295   "//media/*",
296   "//mojo/*",
297
298   #"//native_client/*",
299   "//net/*",
300
301   #"//pdf/*",  # Medium-hard.
302   #"//ppapi/*",  # Lots of errors.
303   "//ppapi/examples/*",
304   "//ppapi/tests/*",
305   "//printing/*",
306
307   #"//remoting/*",  # Medium-hard.
308   "//rlz/*",
309
310   #"//sandbox/*",  # Medium-hard.
311   "//services/*",
312   "//skia/*",
313   "//sql/*",
314   "//storage/*",
315   "//testing/*",
316
317   #"//third_party/*",  # May not ever want this.
318   "//third_party/Python-Markdown/*",
319
320   # "//third_party/SPIRV-Tools/*",  # 30ish errors
321   "//third_party/abseil-cpp/*",
322   "//third_party/accessibility-audit/*",
323   "//third_party/accessibility_test_framework/*",
324   "//third_party/adobe/*",
325   "//third_party/afl/*",
326   "//third_party/android_build_tools/*",
327   "//third_party/android_crazy_linker/*",
328   "//third_party/android_data_chart/*",
329   "//third_party/android_deps/*",
330   "//third_party/android_media/*",
331   "//third_party/android_ndk/*",
332   "//third_party/android_opengl/*",
333   "//third_party/android_platform/*",
334   "//third_party/android_protobuf/*",
335   "//third_party/android_sdk/*",
336   "//third_party/android_support_test_runner/*",
337   "//third_party/android_swipe_refresh/*",
338   "//third_party/android_system_sdk/*",
339   "//third_party/android_testrunner/*",
340   "//third_party/android_tools/*",
341
342   # "//third_party/angle/*",  # 30ish errors
343   "//third_party/apache-portable-runtime/*",
344   "//third_party/apache_velocity/*",
345   "//third_party/apache-win32/*",
346   "//third_party/apk-patch-size-estimator/*",
347   "//third_party/apple_apsl/*",
348   "//third_party/appurify-python/*",
349   "//third_party/arcore-android-sdk/*",
350   "//third_party/ashmem/*",
351   "//third_party/auto/*",
352   "//third_party/axe-core/*",
353   "//third_party/bazel/*",
354   "//third_party/bidichecker/*",
355   "//third_party/binutils/*",
356   "//third_party/blanketjs/*",
357
358   # "//third_party/blink/*",  # Errors: https://crbug.com/800764
359   "//third_party/blink/public/*",
360
361   #"//third_party/breakpad/*",  # Small errors.
362   "//third_party/boringssl/*",
363   "//third_party/bouncycastle/*",
364   "//third_party/brotli/*",
365   "//third_party/bspatch/*",
366   "//third_party/byte_buddy/*",
367   "//third_party/cacheinvalidation/*",
368   "//third_party/catapult/*",
369   "//third_party/cct_dynamic_module/*",
370
371   # "//third_party/ced/*",  # 6 errors
372   "//third_party/chaijs/*",
373   "//third_party/checkstyle/*",
374   "//third_party/chromevox/*",
375   "//third_party/chromite/*",
376   "//third_party/cld_2/*",
377   "//third_party/cld_3/*",
378   "//third_party/closure_compiler/*",
379   "//third_party/colorama/*",
380
381   # "//third_party/crashpad/*", 20ish errors
382   "//third_party/crc32c/*",
383   "//third_party/cros_system_api/*",
384   "//third_party/custom_tabs_client/*",
385   "//third_party/cython/*",
386   "//third_party/d3/*",
387   "//third_party/dawn/*",
388   "//third_party/decklink/*",
389   "//third_party/depot_tools/*",
390   "//third_party/deqp/*",
391   "//third_party/devscripts/*",
392   "//third_party/devtools-node-modules/*",
393   "//third_party/dom_distiller_js/*",
394   "//third_party/elfutils/*",
395   "//third_party/errorprone/*",
396   "//third_party/espresso/*",
397   "//third_party/eu-strip/*",
398   "//third_party/expat/*",
399   "//third_party/eyesfree/*",
400   "//third_party/feed/*",
401
402   # "//third_party/ffmpeg/*",  # android_cronet only https://crbug.com/898793
403   "//third_party/fips181/*",
404   "//third_party/flac/*",
405   "//third_party/flatbuffers/*",
406   "//third_party/flot/*",
407   "//third_party/fontconfig/*",
408   "//third_party/freetype/*",
409   "//third_party/freetype2/*",
410   "//third_party/freetype-android/*",
411   "//third_party/fuchsia-sdk/*",
412   "//third_party/gestures/*",
413   "//third_party/gif_player/*",
414   "//third_party/glfw/*",
415   "//third_party/glslang/*",
416   "//third_party/google_appengine_cloudstorage/*",
417   "//third_party/google_input_tools/*",
418   "//third_party/googletest/*",
419   "//third_party/google_toolbox_for_mac/*",
420   "//third_party/google-truth/*",
421   "//third_party/gradle_wrapper/*",
422   "//third_party/gson/*",
423   "//third_party/guava/*",
424   "//third_party/gvr-android-keyboard/*",
425   "//third_party/gvr-android-sdk/*",
426   "//third_party/hamcrest/*",
427   "//third_party/harfbuzz-ng/*",
428   "//third_party/hunspell/*",
429   "//third_party/hunspell/*",
430   "//third_party/hunspell_dictionaries/*",
431   "//third_party/iaccessible2/*",
432   "//third_party/iccjpeg/*",
433
434   # "//third_party/icu/*",  # Many errors
435   "//third_party/icu4j/*",
436   "//third_party/ijar/*",
437   "//third_party/ink/*",
438   "//third_party/inspector_protocol/*",
439   "//third_party/instrumented_libraries/*",
440   "//third_party/intellij/*",
441   "//third_party/isimpledom/*",
442   "//third_party/javax_inject/*",
443   "//third_party/jinja2/*",
444   "//third_party/jmake/*",
445   "//third_party/jsoncpp/*",
446   "//third_party/jsr-305/*",
447   "//third_party/jstemplate/*",
448   "//third_party/junit/*",
449   "//third_party/khronos/*",
450   "//third_party/lcov/*",
451   "//third_party/leakcanary/*",
452   "//third_party/leveldatabase/*",
453   "//third_party/libFuzzer/*",
454   "//third_party/libXNVCtrl/*",
455   "//third_party/libaddressinput/*",
456
457   # "//third_party/libaom/*",  # https://crbug.com/899771
458   "//third_party/libc++/*",
459   "//third_party/libc++abi/*",
460   "//third_party/libcxx-pretty-printers/*",
461   "//third_party/libdrm/*",
462   "//third_party/libevdev/*",
463   "//third_party/libexif/*",
464   "//third_party/libjingle/*",
465
466   # "//third_party/libjingle_xmpp/*",  # 30ish errors
467   "//third_party/libjpeg/*",
468
469   # "//third_party/libjpeg_turbo/*",  # 3 errors
470   # "//third_party/liblouis/*",  # Small errors
471   "//third_party/libovr/*",
472   "//third_party/libphonenumber/*",
473   "//third_party/libpng/*",
474   "//third_party/libprotobuf-mutator/*",
475   "//third_party/libsecret/*",
476   "//third_party/libsrtp/*",
477   "//third_party/libsync/*",
478   "//third_party/libudev/*",
479   "//third_party/libusb/*",
480
481   # "//third_party/libvpx/*",  # Many errors
482   "//third_party/libvpx_new/*",
483   "//third_party/libwebm/*",
484
485   #"//third_party/libwebp/*",  # Errors: https://crbug.com/800762
486   "//third_party/libxml/*",
487   "//third_party/libxslt/*",
488   "//third_party/libyuv/*",
489   "//third_party/llvm/*",
490   "//third_party/llvm-bootstrap/*",
491   "//third_party/llvm-bootstrap-install/*",
492   "//third_party/llvm-build-tools/*",
493   "//third_party/logilab/*",
494   "//third_party/lss/*",
495   "//third_party/lzma_sdk/*",
496   "//third_party/mach_override/*",
497   "//third_party/markdown/*",
498   "//third_party/markupsafe/*",
499   "//third_party/material_design_icons/*",
500   "//third_party/mesa_headers/*",
501   "//third_party/metrics_proto/*",
502   "//third_party/minigbm/*",
503   "//third_party/minizip/*",
504   "//third_party/mocha/*",
505   "//third_party/mockito/*",
506   "//third_party/modp_b64/*",
507   "//third_party/motemplate/*",
508   "//third_party/mozilla/*",
509   "//third_party/mtpd/*",
510   "//third_party/netty4/*",
511   "//third_party/netty-tcnative/*",
512   "//third_party/node/*",
513   "//third_party/nvml/*",
514   "//third_party/objenesis/*",
515   "//third_party/ocmock/*",
516   "//third_party/openh264/*",
517
518   # "//third_party/openmax_dl/*",  # 1 error
519   "//third_party/openvr/*",
520   "//third_party/opus/*",
521   "//third_party/ots/*",
522   "//third_party/ow2_asm/*",
523
524   # "//third_party/pdfium/*",  # 3 errors
525   "//third_party/perfetto/*",
526   "//third_party/pexpect/*",
527   "//third_party/ply/*",
528   "//third_party/polymer/*",
529   "//third_party/proguard/*",
530   "//third_party/protobuf/*",
531   "//third_party/pycoverage/*",
532   "//third_party/pyelftools/*",
533   "//third_party/pyftpdlib/*",
534   "//third_party/pyjson5/*",
535   "//third_party/pylint/*",
536   "//third_party/pymock/*",
537   "//third_party/pystache/*",
538   "//third_party/py_trace_event/*",
539   "//third_party/pywebsocket/*",
540   "//third_party/qcms/*",
541   "//third_party/quic_trace/*",
542   "//third_party/qunit/*",
543   "//third_party/r8/*",
544   "//third_party/re2/*",
545   "//third_party/requests/*",
546   "//third_party/retrolambda/*",
547   "//third_party/rnnoise/*",
548   "//third_party/robolectric/*",
549   "//third_party/s2cellid/*",
550   "//third_party/safe_browsing/*",
551   "//third_party/scan-build/*",
552
553   # "//third_party/sfntly/*",  # 20ish errors
554   "//third_party/shaderc/*",
555   "//third_party/simplejson/*",
556   "//third_party/sinonjs/*",
557   "//third_party/skia/*",
558   "//third_party/smhasher/*",
559   "//third_party/snappy/*",
560   "//third_party/speech-dispatcher/*",
561   "//third_party/spirv-cross/*",
562   "//third_party/spirv-headers/*",
563   "//third_party/sqlite/*",
564   "//third_party/sqlite4java/*",
565   "//third_party/stp/*",
566   "//third_party/sudden_motion_sensor/*",
567
568   # "//third_party/swiftshader/*",  # 1 error
569   "//third_party/swig/*",
570   "//third_party/tcmalloc/*",
571   "//third_party/test_fonts/*",
572   "//third_party/tlslite/*",
573   "//third_party/ub-uiautomator/*",
574   "//third_party/unrar/*",
575   "//third_party/usb_ids/*",
576   "//third_party/usrsctp/*",
577   "//third_party/v4l-utils/*",
578   "//third_party/valgrind/*",
579   "//third_party/visualmetrics/*",
580   "//third_party/vulkan/*",
581   "//third_party/vulkan-validation-layers/*",
582
583   # "//third_party/wayland/*",  # Small errors
584   "//third_party/wayland-protocols/*",
585   "//third_party/wds/*",
586   "//third_party/web-animations-js/*",
587   "//third_party/webdriver/*",
588   "//third_party/webgl/*",
589   "//third_party/webpagereplay/*",
590   "//third_party/webrtc/*",
591   "//third_party/webrtc_overrides/*",
592   "//third_party/widevine/*",
593   "//third_party/win_build_output/*",
594   "//third_party/woff2/*",
595   "//third_party/wtl/*",
596   "//third_party/xdg-utils/*",
597   "//third_party/xstream/*",
598   "//third_party/yara/*",
599   "//third_party/yasm/*",
600   "//third_party/zlib/*",
601   "//third_party/woff2/*",
602
603   "//tools/*",
604   "//ui/*",
605   "//url/*",
606
607   #"//v8/*",  # Errors: https://bugs.chromium.org/p/v8/issues/detail?id=7330
608 ]
609
610 # These are the list of GN files that run exec_script. This whitelist exists
611 # to force additional review for new uses of exec_script, which is strongly
612 # discouraged.
613 #
614 # PLEASE READ
615 #
616 # You should almost never need to add new exec_script calls. exec_script is
617 # slow, especially on Windows, and can cause confusing effects. Although
618 # individually each call isn't slow or necessarily very confusing, at the scale
619 # of our repo things get out of hand quickly. By strongly pushing back on all
620 # additions, we keep the build fast and clean. If you think you need to add a
621 # new call, please consider:
622 #
623 # - Do not use a script to check for the existence of a file or directory to
624 #   enable a different mode. Instead, use GN build args to enable or disable
625 #   functionality and set options. An example is checking for a file in the
626 #   src-internal repo to see if the corresponding src-internal feature should
627 #   be enabled. There are several things that can go wrong with this:
628 #
629 #    - It's mysterious what causes some things to happen. Although in many cases
630 #      such behavior can be conveniently automatic, GN optimizes for explicit
631 #      and obvious behavior so people can more easily diagnose problems.
632 #
633 #    - The user can't enable a mode for one build and not another. With GN build
634 #      args, the user can choose the exact configuration of multiple builds
635 #      using one checkout. But implicitly basing flags on the state of the
636 #      checkout, this functionality is broken.
637 #
638 #    - It's easy to get stale files. If for example the user edits the gclient
639 #      to stop checking out src-internal (or any other optional thing), it's
640 #      easy to end up with stale files still mysteriously triggering build
641 #      conditions that are no longer appropriate (yes, this happens in real
642 #      life).
643 #
644 # - Do not use a script to iterate files in a directory (glob):
645 #
646 #    - This has the same "stale file" problem as the above discussion. Various
647 #      operations can leave untracked files in the source tree which can cause
648 #      surprising effects.
649 #
650 #    - It becomes impossible to use "git grep" to find where a certain file is
651 #      referenced. This operation is very common and people really do get
652 #      confused when things aren't listed.
653 #
654 #    - It's easy to screw up. One common case is a build-time script that packs
655 #      up a directory. The author notices that the script isn't re-run when the
656 #      directory is updated, so adds a glob so all the files are listed as
657 #      inputs. This seems to work great... until a file is deleted. When a
658 #      file is deleted, all the inputs the glob lists will still be up to date
659 #      and no command-lines will have been changed. The action will not be
660 #      re-run and the build will be broken. It is possible to get this correct
661 #      using glob, and it's possible to mess it up without glob, but globs make
662 #      this situation much easier to create. if the build always lists the
663 #      files and passes them to a script, it will always be correct.
664
665 exec_script_whitelist =
666     build_dotfile_settings.exec_script_whitelist +
667     angle_dotfile_settings.exec_script_whitelist +
668     [
669       # Whitelist entries for //build should go into
670       # //build/dotfile_settings.gni instead, so that they can be shared
671       # with other repos. The entries in this list should be only for files
672       # in the Chromium repo outside of //build.
673       "//build_overrides/build.gni",
674
675       # TODO(dgn): Layer violation but breaks the build otherwise, see
676       # https://crbug.com/474506.
677       "//clank/java/BUILD.gn",
678       "//clank/native/BUILD.gn",
679
680       "//google_apis/BUILD.gn",
681       "//printing/BUILD.gn",
682
683       "//remoting/host/installer/linux/BUILD.gn",
684       "//remoting/remoting_version.gni",
685       "//remoting/host/installer/win/generate_clsids.gni",
686
687       "//tools/grit/grit_rule.gni",
688     ]