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 # 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/"
16 # These arguments override the default values for items in a declare_args
17 # block. "gn args" in turn can override these.
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.
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.
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).
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",
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",
51 v8_experimental_extra_library_files = []
52 v8_enable_gdbjit = false
53 v8_imminent_deprecation_warnings = false
55 # TODO(jochen): Remove this. http://crbug.com/v8/5830,
56 # http://crbug.com/728583.
57 v8_check_microtasks_scopes_consistency = false
59 # Don't include webrtc's builtin task queue implementation.
60 rtc_link_task_queue_impl = false
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
67 # Changes some setup for the Crashpad build to set them to build against
68 # Chromium's zlib, base, etc.
69 crashpad_dependencies = "chromium"
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".
77 #"//apps/*", # Medium-hard.
84 #"//chrome/*", # Epic number of errors.
86 "//chrome/app_shim/*",
87 "//chrome/browser/chromeos/*",
88 "//chrome/browser/extensions/*",
89 "//chrome/browser/resource_coordinator/*",
90 "//chrome/browser/ui/*",
91 "//chrome/chrome_cleaner/*",
93 "//chrome/installer/*",
95 "//chrome/third_party/mozilla_security_manager/*",
110 #"//extensions/*", # Lots of errors.
111 "//extensions:extensions_unittests",
112 "//extensions/browser:browser_tests",
113 "//extensions/browser:unit_tests",
114 "//extensions/browser/install:*",
115 "//extensions/common:common",
116 "//extensions/common:unit_tests",
117 "//extensions/renderer:unit_tests",
118 "//extensions/shell/*",
134 #"//native_client/*",
137 #"//pdf/*", # Medium-hard.
138 #"//ppapi/*", # Lots of errors.
139 "//ppapi/examples/*",
143 #"//remoting/*", # Medium-hard.
146 #"//sandbox/*", # Medium-hard.
153 #"//third_party/*", # May not ever want this.
154 #"//third_party/breakpad/*", # Small errors.
155 "//third_party/boringssl/*",
156 "//third_party/brotli/*",
157 "//third_party/fuchsia-sdk/*",
158 "//third_party/hunspell/*",
159 "//third_party/leveldatabase/*",
161 #"//third_party/libaddressinput/*", # Small errors.
162 "//third_party/libphonenumber/*",
164 #"//third_party/libwebp/*", # Errors: https://crbug.com/800762
165 "//third_party/snappy/*",
167 #"//third_party/WebKit/*", # Errors: https://crbug.com/800764
168 #"//third_party/webrtc/*", # Errors: https://crbug.com/824831
169 "//third_party/webrtc_overrides/*",
175 #"//v8/*", # Errors: https://bugs.chromium.org/p/v8/issues/detail?id=7330
179 # These are the list of GN files that run exec_script. This whitelist exists
180 # to force additional review for new uses of exec_script, which is strongly
185 # Some of these entries are for legacy gypi_to_gn calls. We should not be
186 # adding new calls to this script in the build (see //build/gypi_to_gn.py for
187 # detailed advice). The only time you should be editing this list for
188 # gypi_to_gn purposes is when moving an existing call to a different place.
192 # You should almost never need to add new exec_script calls. exec_script is
193 # slow, especially on Windows, and can cause confusing effects. Although
194 # individually each call isn't slow or necessarily very confusing, at the scale
195 # of our repo things get out of hand quickly. By strongly pushing back on all
196 # additions, we keep the build fast and clean. If you think you need to add a
197 # new call, please consider:
199 # - Do not use a script to check for the existance of a file or directory to
200 # enable a different mode. Instead, use GN build args to enable or disable
201 # functionality and set options. An example is checking for a file in the
202 # src-internal repo to see if the corresponding src-internal feature should
203 # be enabled. There are several things that can go wrong with this:
205 # - It's mysterious what causes some things to happen. Although in many cases
206 # such behavior can be conveniently automatic, GN optimizes for explicit
207 # and obvious behavior so people can more easily diagnose problems.
209 # - The user can't enable a mode for one build and not another. With GN build
210 # args, the user can choose the exact configuration of multiple builds
211 # using one checkout. But implicitly basing flags on the state of the
212 # checkout, this functionality is broken.
214 # - It's easy to get stale files. If for example the user edits the gclient
215 # to stop checking out src-internal (or any other optional thing), it's
216 # easy to end up with stale files still mysteriously triggering build
217 # conditions that are no longer appropriate (yes, this happens in real
220 # - Do not use a script to iterate files in a directory (glob):
222 # - This has the same "stale file" problem as the above discussion. Various
223 # operations can leave untracked files in the source tree which can cause
224 # surprising effects.
226 # - It becomes impossible to use "git grep" to find where a certain file is
227 # referenced. This operation is very common and people really do get
228 # confused when things aren't listed.
230 # - It's easy to screw up. One common case is a build-time script that packs
231 # up a directory. The author notices that the script isn't re-run when the
232 # directory is updated, so adds a glob so all the files are listed as
233 # inputs. This seems to work great... until a file is deleted. When a
234 # file is deleted, all the inputs the glob lists will still be up to date
235 # and no command-lines will have been changed. The action will not be
236 # re-run and the build will be broken. It is possible to get this correct
237 # using glob, and it's possible to mess it up without glob, but globs make
238 # this situation much easier to create. if the build always lists the
239 # files and passes them to a script, it will always be correct.
241 exec_script_whitelist =
242 build_dotfile_settings.exec_script_whitelist +
243 angle_dotfile_settings.exec_script_whitelist +
245 # Whitelist entries for //build should go into
246 # //build/dotfile_settings.gni instead, so that they can be shared
247 # with other repos. The entries in this list should be only for files
248 # in the Chromium repo outside of //build.
249 "//build_overrides/build.gni",
251 # TODO(dgn): Layer violation but breaks the build otherwise, see
252 # https://crbug.com/474506.
253 "//clank/java/BUILD.gn",
254 "//clank/native/BUILD.gn",
256 "//remoting/host/installer/linux/BUILD.gn",
257 "//remoting/remoting_version.gni",
258 "//remoting/host/installer/win/generate_clsids.gni",
260 # TODO(dpranke): Get these from the appropriate repos instead.
261 "//third_party/catapult/tracing/BUILD.gn",
262 "//third_party/google_input_tools/inputview.gni",
264 "//tools/grit/grit_rule.gni",
267 "//google_apis/BUILD.gn",
268 "//printing/BUILD.gn",