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/ui/*",
91 "//chrome/installer/*",
93 "//chrome/third_party/mozilla_security_manager/*",
108 #"//extensions/*", # Lots of errors.
109 "//extensions:extensions_unittests",
110 "//extensions/browser:browser_tests",
111 "//extensions/browser:unit_tests",
112 "//extensions/browser/install:*",
113 "//extensions/common:common",
114 "//extensions/common:unit_tests",
115 "//extensions/renderer:unit_tests",
116 "//extensions/shell/*",
132 #"//native_client/*",
135 #"//pdf/*", # Medium-hard.
136 #"//ppapi/*", # Lots of errors.
137 "//ppapi/examples/*",
141 #"//remoting/*", # Medium-hard.
144 #"//sandbox/*", # Medium-hard.
151 #"//third_party/*", # May not ever want this.
152 #"//third_party/breakpad/*", # Small errors.
153 "//third_party/brotli/*",
154 "//third_party/hunspell/*",
155 "//third_party/leveldatabase/*",
157 #"//third_party/libaddressinput/*", # Small errors.
158 "//third_party/libphonenumber/*",
160 #"//third_party/libwebp/*", # Errors: https://crbug.com/800762
161 "//third_party/snappy/*",
163 #"//third_party/WebKit/*", # Errors: https://crbug.com/800764
164 #"//third_party/webrtc/*", # Errors: https://crbug.com/824831
165 "//third_party/webrtc_overrides/*",
171 #"//v8/*", # Errors: https://bugs.chromium.org/p/v8/issues/detail?id=7330
175 # These are the list of GN files that run exec_script. This whitelist exists
176 # to force additional review for new uses of exec_script, which is strongly
181 # Some of these entries are for legacy gypi_to_gn calls. We should not be
182 # adding new calls to this script in the build (see //build/gypi_to_gn.py for
183 # detailed advice). The only time you should be editing this list for
184 # gypi_to_gn purposes is when moving an existing call to a different place.
188 # You should almost never need to add new exec_script calls. exec_script is
189 # slow, especially on Windows, and can cause confusing effects. Although
190 # individually each call isn't slow or necessarily very confusing, at the scale
191 # of our repo things get out of hand quickly. By strongly pushing back on all
192 # additions, we keep the build fast and clean. If you think you need to add a
193 # new call, please consider:
195 # - Do not use a script to check for the existance of a file or directory to
196 # enable a different mode. Instead, use GN build args to enable or disable
197 # functionality and set options. An example is checking for a file in the
198 # src-internal repo to see if the corresponding src-internal feature should
199 # be enabled. There are several things that can go wrong with this:
201 # - It's mysterious what causes some things to happen. Although in many cases
202 # such behavior can be conveniently automatic, GN optimizes for explicit
203 # and obvious behavior so people can more easily diagnose problems.
205 # - The user can't enable a mode for one build and not another. With GN build
206 # args, the user can choose the exact configuration of multiple builds
207 # using one checkout. But implicitly basing flags on the state of the
208 # checkout, this functionality is broken.
210 # - It's easy to get stale files. If for example the user edits the gclient
211 # to stop checking out src-internal (or any other optional thing), it's
212 # easy to end up with stale files still mysteriously triggering build
213 # conditions that are no longer appropriate (yes, this happens in real
216 # - Do not use a script to iterate files in a directory (glob):
218 # - This has the same "stale file" problem as the above discussion. Various
219 # operations can leave untracked files in the source tree which can cause
220 # surprising effects.
222 # - It becomes impossible to use "git grep" to find where a certain file is
223 # referenced. This operation is very common and people really do get
224 # confused when things aren't listed.
226 # - It's easy to screw up. One common case is a build-time script that packs
227 # up a directory. The author notices that the script isn't re-run when the
228 # directory is updated, so adds a glob so all the files are listed as
229 # inputs. This seems to work great... until a file is deleted. When a
230 # file is deleted, all the inputs the glob lists will still be up to date
231 # and no command-lines will have been changed. The action will not be
232 # re-run and the build will be broken. It is possible to get this correct
233 # using glob, and it's possible to mess it up without glob, but globs make
234 # this situation much easier to create. if the build always lists the
235 # files and passes them to a script, it will always be correct.
237 exec_script_whitelist =
238 build_dotfile_settings.exec_script_whitelist +
239 angle_dotfile_settings.exec_script_whitelist +
241 # Whitelist entries for //build should go into
242 # //build/dotfile_settings.gni instead, so that they can be shared
243 # with other repos. The entries in this list should be only for files
244 # in the Chromium repo outside of //build.
245 "//build_overrides/build.gni",
247 # TODO(dgn): Layer violation but breaks the build otherwise, see
248 # https://crbug.com/474506.
249 "//clank/java/BUILD.gn",
250 "//clank/native/BUILD.gn",
252 "//remoting/host/installer/linux/BUILD.gn",
253 "//remoting/remoting_version.gni",
254 "//remoting/host/installer/win/generate_clsids.gni",
256 # TODO(dpranke): Get these from the appropriate repos instead.
257 "//third_party/catapult/tracing/BUILD.gn",
258 "//third_party/google_input_tools/inputview.gni",
260 "//tools/grit/grit_rule.gni",
263 "//google_apis/BUILD.gn",
264 "//printing/BUILD.gn",