blob: 29d65d771249b3844f3bc95ae61041c31eb45f5e [file] [log] [blame]
brettw2bafab42014-11-27 18:36:171# 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.
[email protected]96ea63d2013-07-30 10:17:074
dpranke1cfa5312016-11-22 03:07:475import("//build/dotfile_settings.gni")
6
[email protected]96ea63d2013-07-30 10:17:077# The location of the build configuration file.
8buildconfig = "//build/config/BUILDCONFIG.gn"
9
10# The secondary source root is a parallel directory tree where
scheibec4b3a42014-09-18 21:50:1311# GN build files are placed when they can not be placed directly
12# in the source tree, e.g. for third party source trees.
[email protected]26688b86e2014-06-19 13:14:2613secondary_source = "//build/secondary/"
brettw2bafab42014-11-27 18:36:1714
brettw04a0e482017-01-25 21:29:5915# These arguments override the default values for items in a declare_args
16# block. "gn args" in turn can override these.
17#
18# In general the value for a build arg in the declare_args block should be the
19# default. In some cases, a DEPS-ed in project will want different defaults for
20# being built as part of Chrome vs. being built standalone. In this case, the
21# Chrome defaults should go here. There should be no overrides here for
22# values declared in the main Chrome repository.
brettwd8a46d92017-02-08 06:03:4523#
24# Important note for defining defaults: This file is executed before the
25# BUILDCONFIG.gn file. That file sets up the global variables like "is_ios".
26# This means that the default_args can not depend on the platform,
27# architecture, or other build parameters. If you really need that, the other
28# repo should define a flag that toggles on a behavior that implements the
29# additional logic required by Chrome to set the variables.
brettw04a0e482017-01-25 21:29:5930default_args = {
Sylvain Defresne994145512017-06-06 11:27:0231 # TODO(brettw) bug 684096: Chrome on iOS does not build v8, so "gn gen" prints
32 # a warning that "Build argument has no effect". When adding a v8 variable, it
33 # also needs to be defined to src/ios/BUILD.gn (respectively removed from both
34 # location when it is removed).
35
brettw04a0e482017-01-25 21:29:5936 v8_extra_library_files = [
37 # Dependencies used by the extra libraries. Putting them here causes them
38 # to be executed first during snapshot creation.
Adam Ricebe92b2da2017-07-28 13:07:1839 "//third_party/WebKit/Source/core/streams/CommonOperations.js",
brettw04a0e482017-01-25 21:29:5940 "//third_party/WebKit/Source/core/streams/CommonStrings.js",
riceae12378252017-03-21 06:26:2941 "//third_party/WebKit/Source/core/streams/SimpleQueue.js",
brettw04a0e482017-01-25 21:29:5942
43 # Extra libraries.
44 "//third_party/WebKit/Source/core/streams/ByteLengthQueuingStrategy.js",
45 "//third_party/WebKit/Source/core/streams/CountQueuingStrategy.js",
46 "//third_party/WebKit/Source/core/streams/ReadableStream.js",
ricea9ba4a6432017-01-26 17:11:5747 "//third_party/WebKit/Source/core/streams/WritableStream.js",
48 ]
ricea3f731a92017-04-05 12:35:2549 v8_experimental_extra_library_files = []
brettw04a0e482017-01-25 21:29:5950 v8_enable_gdbjit = false
51 v8_imminent_deprecation_warnings = false
Jochen Eisinger8be7d37b2017-06-02 08:37:5652
53 # TODO(jochen): Remove this. http://crbug.com/v8/5830,
54 # http://crbug.com/728583.
55 v8_check_microtasks_scopes_consistency = false
brettw04a0e482017-01-25 21:29:5956}
57
brettw2bafab42014-11-27 18:36:1758# These are the targets to check headers for by default. The files in targets
59# matching these patterns (see "gn help label_pattern" for format) will have
60# their includes checked for proper dependencies when you run either
61# "gn check" or "gn gen --check".
brettwe75311d2015-02-17 23:56:4662check_targets = [
brettwbc44c0a92015-02-20 22:30:3963 #"//apps/*", # Medium-hard.
mswafbb0c02016-02-11 01:54:1264 "//ash/*",
brettw29c2f892015-11-27 17:03:4965 "//base/*",
brettwbc44c0a92015-02-20 22:30:3966 "//blink/*",
67 "//breakpad/*",
68 "//build/*",
brettwe75311d2015-02-17 23:56:4669 "//cc/*",
brettwbc44c0a92015-02-20 22:30:3970
71 #"//chrome/*", # Epic number of errors.
tfarina8e584882016-01-09 00:50:1572 "//chrome/app/*",
Michail Pishchagind44036c2017-08-18 20:01:2273 "//chrome/app_shim/*",
Benjamin Gordonae9c1992017-06-19 16:24:2374 "//chrome/browser/chromeos/*",
brettwafa8f542016-08-24 05:16:2475 "//chrome/browser/extensions/*",
brettwb3e60142016-09-23 19:55:0176 "//chrome/browser/ui/*",
brettw0b9c96b12015-10-15 23:06:0477 "//chrome/common/*",
brettwf986f9572015-10-07 17:18:1578 "//chrome/installer/*",
brettw0b9c96b12015-10-15 23:06:0479 "//chrome/third_party/mozilla_security_manager/*",
tfarina961ad5d2016-01-06 22:27:1180 "//chrome/tools/*",
tfarina02f77a42015-12-17 22:38:2381 "//chrome/utility/*",
brettwbc44c0a92015-02-20 22:30:3982 "//chromecast/*",
oshima3f959fa82016-05-02 18:42:5783 "//chromeos/*",
brettwa219e922015-12-07 22:23:3984 "//chrome_elf/*",
85 "//cloud_print/*",
brettwb5440a92015-12-03 00:47:1286 "//components/*",
brettwd064ace4e2016-07-21 21:38:5387 "//content/*",
brettwbc44c0a92015-02-20 22:30:3988 "//courgette/*",
89 "//crypto/*",
90 "//data/*",
91 "//dbus/*",
brettwbda835b2015-12-04 22:12:3092 "//device/*",
brettwbc44c0a92015-02-20 22:30:3993
94 #"//extensions/*", # Lots of errors.
brettwdc1e6182016-08-30 20:52:1395 "//extensions:extensions_unittests",
96 "//extensions/browser:browser_tests",
97 "//extensions/browser:unit_tests",
98 "//extensions/common:unit_tests",
99 "//extensions/renderer:unit_tests",
100 "//extensions/shell:browser_tests",
101 "//extensions/shell:unit_tests",
102 "//extensions/utility:unit_tests",
jbromanb5e31792015-12-09 17:13:02103 "//gin/*",
tfarina9ee681962015-03-02 03:20:13104 "//google_apis/*",
brettwbc44c0a92015-02-20 22:30:39105 "//google_update/*",
brettw09039c12016-03-18 03:22:46106 "//gpu/*",
tfarinaf89722432015-05-15 19:30:19107
sdefresne5f39d8e62016-05-18 19:27:37108 "//ios/*",
109 "//ios_internal/*",
brettwe75311d2015-02-17 23:56:46110 "//ipc/*",
brettwbc44c0a92015-02-20 22:30:39111
112 #"//jingle/*",
skyb0446352015-11-18 00:43:56113 "//mash/*",
sky88d7709e2015-08-12 19:19:49114
Dale Curtisf4b6de132017-08-22 04:04:05115 "//media/*",
116 "//mojo/*",
skyd412f6e2015-07-22 17:22:13117
brettwbc44c0a92015-02-20 22:30:39118 #"//native_client/*",
brettw25ca8922016-03-18 22:59:58119 "//net/*",
brettwbc44c0a92015-02-20 22:30:39120
121 #"//pdf/*", # Medium-hard.
122 #"//ppapi/*", # Lots of errors.
jbroman86f78272015-12-31 00:00:51123 "//ppapi/examples/*",
brettwbc44c0a92015-02-20 22:30:39124 "//printing/*",
125
126 #"//remoting/*", # Medium-hard.
brettw09039c12016-03-18 03:22:46127 "//rlz/*",
128
brettwbc44c0a92015-02-20 22:30:39129 #"//sandbox/*", # Medium-hard.
130 "//sdch/*",
sky1e8f9f862016-05-19 22:34:43131 "//services/*",
brettwbc44c0a92015-02-20 22:30:39132 "//skia/*",
133 "//sql/*",
134 "//storage/*",
brettwbc44c0a92015-02-20 22:30:39135 "//testing/*",
136
137 #"//third_party/*", # May not ever want this.
wychena10837e2017-05-01 16:10:16138 "//third_party/brotli/*",
rouslan30b18292016-03-31 18:05:10139 "//third_party/hunspell/*",
Thiago Farinad7d68852017-05-18 14:21:49140 "//third_party/leveldatabase/*",
rouslan30b18292016-03-31 18:05:10141 "//third_party/libaddressinput/*",
142 "//third_party/libphonenumber/*",
wychenbefe0282017-05-02 19:03:51143 "//third_party/libwebp/*",
Thiago Farinad7d68852017-05-18 14:21:49144 "//third_party/snappy/*",
wychenc50f8192017-05-09 04:37:44145 "//third_party/WebKit/*",
brettwbc44c0a92015-02-20 22:30:39146 "//tools/*",
147
brettwb7f2c302015-12-08 01:29:21148 #"//ui/*", # Work left on Chromeos w/ use_ozone. Some parts of UI that work:
149 "//ui/accessibility/*",
150 "//ui/android/*",
151 "//ui/app_list/*",
xiyuan369cf0c2016-06-30 16:34:15152 "//ui/arc/*",
brettwb7f2c302015-12-08 01:29:21153 "//ui/aura/*",
154 "//ui/aura_extra/*",
155 "//ui/base/*",
156 "//ui/chromeos/*",
157 "//ui/compositor/*",
kylechar3e6b9772016-04-15 18:55:27158 "//ui/content_accelerators/*",
brettwb7f2c302015-12-08 01:29:21159 "//ui/display/*",
kylechar3e6b9772016-04-15 18:55:27160 "//ui/events/*",
brettwb7f2c302015-12-08 01:29:21161 "//ui/file_manager/*",
162 "//ui/gfx/*",
163 "//ui/gl/*",
164 "//ui/keyboard/*",
kylechar3e6b9772016-04-15 18:55:27165 "//ui/latency_info/*",
brettwb7f2c302015-12-08 01:29:21166 "//ui/login/*",
167 "//ui/message_center/*",
brettwb7f2c302015-12-08 01:29:21168 "//ui/mojo/*",
169 "//ui/native_theme/*",
kylechare2b20222016-04-14 20:58:33170 "//ui/ozone/*",
brettwb7f2c302015-12-08 01:29:21171 "//ui/platform_window/*",
172 "//ui/resources/*",
173 "//ui/shell_dialogs/*",
174 "//ui/snapshot/*",
175 "//ui/strings/*",
176 "//ui/surface/*",
177 "//ui/touch_selection/*",
178 "//ui/views/*",
179 "//ui/views_content_client/*",
180 "//ui/web_dialogs/*",
181 "//ui/webui/*",
182 "//ui/wm/*",
brettwbc44c0a92015-02-20 22:30:39183 "//url/*",
184 "//v8/*",
brettw0ead9772015-11-23 23:12:08185 "//win8/*",
brettwe75311d2015-02-17 23:56:46186]
brettwed99f7b2015-04-07 00:22:50187
188# These are the list of GN files that run exec_script. This whitelist exists
189# to force additional review for new uses of exec_script, which is strongly
brettwd385ecf2016-04-19 22:53:23190# discouraged.
191#
192# GYPI_TO_GN
193#
brettw5bbea152017-02-16 00:43:44194# Some of these entries are for legacy gypi_to_gn calls. We should not be
195# adding new calls to this script in the build (see //build/gypi_to_gn.py for
196# detailed advice). The only time you should be editing this list for
197# gypi_to_gn purposes is when moving an existing call to a different place.
brettwd385ecf2016-04-19 22:53:23198#
199# PLEASE READ
200#
201# You should almost never need to add new exec_script calls. exec_script is
202# slow, especially on Windows, and can cause confusing effects. Although
203# individually each call isn't slow or necessarily very confusing, at the scale
204# of our repo things get out of hand quickly. By strongly pushing back on all
205# additions, we keep the build fast and clean. If you think you need to add a
206# new call, please consider:
207#
208# - Do not use a script to check for the existance of a file or directory to
209# enable a different mode. Instead, use GN build args to enable or disable
210# functionality and set options. An example is checking for a file in the
211# src-internal repo to see if the corresponding src-internal feature should
212# be enabled. There are several things that can go wrong with this:
213#
214# - It's mysterious what causes some things to happen. Although in many cases
215# such behavior can be conveniently automatic, GN optimizes for explicit
216# and obvious behavior so people can more easily diagnose problems.
217#
218# - The user can't enable a mode for one build and not another. With GN build
219# args, the user can choose the exact configuration of multiple builds
220# using one checkout. But implicitly basing flags on the state of the
221# checkout, this functionality is broken.
222#
223# - It's easy to get stale files. If for example the user edits the gclient
224# to stop checking out src-internal (or any other optional thing), it's
225# easy to end up with stale files still mysteriously triggering build
226# conditions that are no longer appropriate (yes, this happens in real
227# life).
228#
229# - Do not use a script to iterate files in a directory (glob):
230#
231# - This has the same "stale file" problem as the above discussion. Various
232# operations can leave untracked files in the source tree which can cause
233# surprising effects.
234#
235# - It becomes impossible to use "git grep" to find where a certain file is
236# referenced. This operation is very common and people really do get
237# confused when things aren't listed.
238#
239# - It's easy to screw up. One common case is a build-time script that packs
240# up a directory. The author notices that the script isn't re-run when the
241# directory is updated, so adds a glob so all the files are listed as
242# inputs. This seems to work great... until a file is deleted. When a
thakis3e861de2016-06-14 14:24:01243# file is deleted, all the inputs the glob lists will still be up to date
brettwd385ecf2016-04-19 22:53:23244# and no command-lines will have been changed. The action will not be
245# re-run and the build will be broken. It is possible to get this correct
246# using glob, and it's possible to mess it up without glob, but globs make
247# this situation much easier to create. if the build always lists the
248# files and passes them to a script, it will always be correct.
dgn470951712015-04-07 10:37:47249
dpranke1cfa5312016-11-22 03:07:47250exec_script_whitelist =
251 build_dotfile_settings.exec_script_whitelist + [
252 # Whitelist entries for //build should go into
253 # //build/dotfile_settings.gni instead, so that they can be shared
254 # with other repos. The entries in this list should be only for files
255 # in the Chromium repo outside of //build.
dpranke1cfa5312016-11-22 03:07:47256 "//build_overrides/build.gni",
dgn470951712015-04-07 10:37:47257
dpranke1cfa5312016-11-22 03:07:47258 # TODO(dgn): Layer violation but breaks the build otherwise, see
259 # https://crbug.com/474506.
260 "//clank/java/BUILD.gn",
261 "//clank/native/BUILD.gn",
brettw46134cb2016-09-02 23:53:18262
dpranke1cfa5312016-11-22 03:07:47263 "//remoting/host/installer/linux/BUILD.gn",
264 "//remoting/remoting_version.gni",
265 "//remoting/host/installer/win/generate_clsids.gni",
brettwde7b2652016-09-09 23:25:05266
dpranke1cfa5312016-11-22 03:07:47267 # TODO(dpranke): Get these from the appropriate repos instead.
268 "//third_party/angle/BUILD.gn",
269 "//third_party/angle/src/tests/BUILD.gn",
270 "//third_party/angle/src/vulkan_support/BUILD.gn",
271 "//third_party/catapult/tracing/BUILD.gn",
272 "//third_party/google_input_tools/inputview.gni",
273
274 # CLD2 should be removed soon, delete this when we do.
275 "//third_party/cld_2/BUILD.gn",
276 "//tools/grit/grit_rule.gni",
277
278 # Not gypi-to-gn.
279 "//google_apis/BUILD.gn",
280 "//printing/BUILD.gn",
281 ]