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