[go: nahoru, domu]

blob: 20f642efb05646a83bf9e6469c7a39daf58bc7db [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.
bauerb@chromium.org96ea63d2013-07-30 10:17:074
dpranke1cfa5312016-11-22 03:07:475import("//build/dotfile_settings.gni")
6
bauerb@chromium.org96ea63d2013-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.
cmasone@chromium.org26688b86e2014-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 Ricebe92b2d2017-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",
riceae1237822017-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 ]
Adam Rice9dc1afc2017-11-10 10:18:5949 v8_experimental_extra_library_files =
50 [ "//third_party/WebKit/Source/core/streams/TransformStream.js" ]
brettw04a0e482017-01-25 21:29:5951 v8_enable_gdbjit = false
52 v8_imminent_deprecation_warnings = false
Jochen Eisinger8be7d37b2017-06-02 08:37:5653
54 # TODO(jochen): Remove this. http://crbug.com/v8/5830,
55 # http://crbug.com/728583.
56 v8_check_microtasks_scopes_consistency = false
Niels Möller0a5db002017-10-17 13:22:1657
58 # Don't include webrtc's builtin task queue implementation.
59 rtc_link_task_queue_impl = false
Karl Wibergf3b599b2017-11-05 21:35:0060
61 # Don't include the iLBC audio codec.
62 # TODO(bugs.webrtc.org/8396): Once WebRTC gets rid of its internal
63 # deps on codecs, we can remove this.
64 rtc_include_ilbc = false
Robert Sesek9c29eaa2017-12-11 19:47:1365
66 # Changes some setup for the Crashpad build to set them to build against
67 # Chromium's zlib, base, etc.
Scott Grahamec25b512017-12-20 05:40:4068 crashpad_dependencies = "chromium"
brettw04a0e482017-01-25 21:29:5969}
70
brettw2bafab42014-11-27 18:36:1771# These are the targets to check headers for by default. The files in targets
72# matching these patterns (see "gn help label_pattern" for format) will have
73# their includes checked for proper dependencies when you run either
74# "gn check" or "gn gen --check".
brettwe75311d2015-02-17 23:56:4675check_targets = [
brettwbc44c0a92015-02-20 22:30:3976 #"//apps/*", # Medium-hard.
mswafbb0c02016-02-11 01:54:1277 "//ash/*",
brettw29c2f892015-11-27 17:03:4978 "//base/*",
brettwbc44c0a92015-02-20 22:30:3979 "//blink/*",
brettwbc44c0a92015-02-20 22:30:3980 "//build/*",
brettwe75311d2015-02-17 23:56:4681 "//cc/*",
brettwbc44c0a92015-02-20 22:30:3982
83 #"//chrome/*", # Epic number of errors.
tfarina8e584882016-01-09 00:50:1584 "//chrome/app/*",
Michail Pishchagind44036c2017-08-18 20:01:2285 "//chrome/app_shim/*",
Benjamin Gordonae9c1992017-06-19 16:24:2386 "//chrome/browser/chromeos/*",
brettwafa8f542016-08-24 05:16:2487 "//chrome/browser/extensions/*",
brettwb3e60142016-09-23 19:55:0188 "//chrome/browser/ui/*",
brettw0b9c96b12015-10-15 23:06:0489 "//chrome/common/*",
brettwf986f952015-10-07 17:18:1590 "//chrome/installer/*",
Brett Wilson69cf4732017-09-01 01:34:4091 "//chrome/profiling",
brettw0b9c96b12015-10-15 23:06:0492 "//chrome/third_party/mozilla_security_manager/*",
tfarina961ad5d2016-01-06 22:27:1193 "//chrome/tools/*",
tfarina02f77a42015-12-17 22:38:2394 "//chrome/utility/*",
brettwbc44c0a92015-02-20 22:30:3995 "//chromecast/*",
oshima3f959fa82016-05-02 18:42:5796 "//chromeos/*",
brettwa219e922015-12-07 22:23:3997 "//chrome_elf/*",
98 "//cloud_print/*",
brettwb5440a92015-12-03 00:47:1299 "//components/*",
brettwd064ace4e2016-07-21 21:38:53100 "//content/*",
brettwbc44c0a92015-02-20 22:30:39101 "//courgette/*",
102 "//crypto/*",
103 "//data/*",
104 "//dbus/*",
brettwbda835b2015-12-04 22:12:30105 "//device/*",
brettwbc44c0a92015-02-20 22:30:39106
107 #"//extensions/*", # Lots of errors.
brettwdc1e6182016-08-30 20:52:13108 "//extensions:extensions_unittests",
109 "//extensions/browser:browser_tests",
110 "//extensions/browser:unit_tests",
111 "//extensions/common:unit_tests",
112 "//extensions/renderer:unit_tests",
113 "//extensions/shell:browser_tests",
114 "//extensions/shell:unit_tests",
115 "//extensions/utility:unit_tests",
jbromanb5e31792015-12-09 17:13:02116 "//gin/*",
tfarina9ee681962015-03-02 03:20:13117 "//google_apis/*",
brettwbc44c0a92015-02-20 22:30:39118 "//google_update/*",
brettw09039c12016-03-18 03:22:46119 "//gpu/*",
tfarinaf89722432015-05-15 19:30:19120
sdefresne5f39d8e62016-05-18 19:27:37121 "//ios/*",
122 "//ios_internal/*",
brettwe75311d2015-02-17 23:56:46123 "//ipc/*",
brettwbc44c0a92015-02-20 22:30:39124
125 #"//jingle/*",
skyb0446352015-11-18 00:43:56126 "//mash/*",
sky88d7709e2015-08-12 19:19:49127
Dale Curtisf4b6de132017-08-22 04:04:05128 "//media/*",
129 "//mojo/*",
skyd412f6e2015-07-22 17:22:13130
brettwbc44c0a92015-02-20 22:30:39131 #"//native_client/*",
brettw25ca8922016-03-18 22:59:58132 "//net/*",
brettwbc44c0a92015-02-20 22:30:39133
134 #"//pdf/*", # Medium-hard.
135 #"//ppapi/*", # Lots of errors.
jbroman86f78272015-12-31 00:00:51136 "//ppapi/examples/*",
brettwbc44c0a92015-02-20 22:30:39137 "//printing/*",
138
139 #"//remoting/*", # Medium-hard.
brettw09039c12016-03-18 03:22:46140 "//rlz/*",
141
brettwbc44c0a92015-02-20 22:30:39142 #"//sandbox/*", # Medium-hard.
sky1e8f9f862016-05-19 22:34:43143 "//services/*",
brettwbc44c0a92015-02-20 22:30:39144 "//skia/*",
145 "//sql/*",
146 "//storage/*",
brettwbc44c0a92015-02-20 22:30:39147 "//testing/*",
148
149 #"//third_party/*", # May not ever want this.
Mark Mentovaiebb9ddd2017-09-25 17:24:41150 "//third_party/breakpad/*",
wychena10837e2017-05-01 16:10:16151 "//third_party/brotli/*",
rouslan30b18292016-03-31 18:05:10152 "//third_party/hunspell/*",
Thiago Farinad7d68852017-05-18 14:21:49153 "//third_party/leveldatabase/*",
rouslan30b18292016-03-31 18:05:10154 "//third_party/libaddressinput/*",
155 "//third_party/libphonenumber/*",
wychenbefe0282017-05-02 19:03:51156 "//third_party/libwebp/*",
Thiago Farinad7d68852017-05-18 14:21:49157 "//third_party/snappy/*",
wychenc50f8192017-05-09 04:37:44158 "//third_party/WebKit/*",
brettwbc44c0a92015-02-20 22:30:39159 "//tools/*",
160
kylechard51a15f32017-09-11 17:25:30161 "//ui/*",
brettwbc44c0a92015-02-20 22:30:39162 "//url/*",
163 "//v8/*",
brettw0ead9772015-11-23 23:12:08164 "//win8/*",
brettwe75311d2015-02-17 23:56:46165]
brettwed99f7b2015-04-07 00:22:50166
167# These are the list of GN files that run exec_script. This whitelist exists
168# to force additional review for new uses of exec_script, which is strongly
brettwd385ecf2016-04-19 22:53:23169# discouraged.
170#
171# GYPI_TO_GN
172#
brettw5bbea152017-02-16 00:43:44173# Some of these entries are for legacy gypi_to_gn calls. We should not be
174# adding new calls to this script in the build (see //build/gypi_to_gn.py for
175# detailed advice). The only time you should be editing this list for
176# gypi_to_gn purposes is when moving an existing call to a different place.
brettwd385ecf2016-04-19 22:53:23177#
178# PLEASE READ
179#
180# You should almost never need to add new exec_script calls. exec_script is
181# slow, especially on Windows, and can cause confusing effects. Although
182# individually each call isn't slow or necessarily very confusing, at the scale
183# of our repo things get out of hand quickly. By strongly pushing back on all
184# additions, we keep the build fast and clean. If you think you need to add a
185# new call, please consider:
186#
187# - Do not use a script to check for the existance of a file or directory to
188# enable a different mode. Instead, use GN build args to enable or disable
189# functionality and set options. An example is checking for a file in the
190# src-internal repo to see if the corresponding src-internal feature should
191# be enabled. There are several things that can go wrong with this:
192#
193# - It's mysterious what causes some things to happen. Although in many cases
194# such behavior can be conveniently automatic, GN optimizes for explicit
195# and obvious behavior so people can more easily diagnose problems.
196#
197# - The user can't enable a mode for one build and not another. With GN build
198# args, the user can choose the exact configuration of multiple builds
199# using one checkout. But implicitly basing flags on the state of the
200# checkout, this functionality is broken.
201#
202# - It's easy to get stale files. If for example the user edits the gclient
203# to stop checking out src-internal (or any other optional thing), it's
204# easy to end up with stale files still mysteriously triggering build
205# conditions that are no longer appropriate (yes, this happens in real
206# life).
207#
208# - Do not use a script to iterate files in a directory (glob):
209#
210# - This has the same "stale file" problem as the above discussion. Various
211# operations can leave untracked files in the source tree which can cause
212# surprising effects.
213#
214# - It becomes impossible to use "git grep" to find where a certain file is
215# referenced. This operation is very common and people really do get
216# confused when things aren't listed.
217#
218# - It's easy to screw up. One common case is a build-time script that packs
219# up a directory. The author notices that the script isn't re-run when the
220# directory is updated, so adds a glob so all the files are listed as
221# inputs. This seems to work great... until a file is deleted. When a
thakis3e861de2016-06-14 14:24:01222# file is deleted, all the inputs the glob lists will still be up to date
brettwd385ecf2016-04-19 22:53:23223# and no command-lines will have been changed. The action will not be
224# re-run and the build will be broken. It is possible to get this correct
225# using glob, and it's possible to mess it up without glob, but globs make
226# this situation much easier to create. if the build always lists the
227# files and passes them to a script, it will always be correct.
dgn470951712015-04-07 10:37:47228
dpranke1cfa5312016-11-22 03:07:47229exec_script_whitelist =
230 build_dotfile_settings.exec_script_whitelist + [
231 # Whitelist entries for //build should go into
232 # //build/dotfile_settings.gni instead, so that they can be shared
233 # with other repos. The entries in this list should be only for files
234 # in the Chromium repo outside of //build.
dpranke1cfa5312016-11-22 03:07:47235 "//build_overrides/build.gni",
dgn470951712015-04-07 10:37:47236
dpranke1cfa5312016-11-22 03:07:47237 # TODO(dgn): Layer violation but breaks the build otherwise, see
238 # https://crbug.com/474506.
239 "//clank/java/BUILD.gn",
240 "//clank/native/BUILD.gn",
brettw46134cb2016-09-02 23:53:18241
dpranke1cfa5312016-11-22 03:07:47242 "//remoting/host/installer/linux/BUILD.gn",
243 "//remoting/remoting_version.gni",
244 "//remoting/host/installer/win/generate_clsids.gni",
brettwde7b2652016-09-09 23:25:05245
dpranke1cfa5312016-11-22 03:07:47246 # TODO(dpranke): Get these from the appropriate repos instead.
247 "//third_party/angle/BUILD.gn",
248 "//third_party/angle/src/tests/BUILD.gn",
249 "//third_party/angle/src/vulkan_support/BUILD.gn",
250 "//third_party/catapult/tracing/BUILD.gn",
251 "//third_party/google_input_tools/inputview.gni",
252
dpranke1cfa5312016-11-22 03:07:47253 "//tools/grit/grit_rule.gni",
254
255 # Not gypi-to-gn.
256 "//google_apis/BUILD.gn",
257 "//printing/BUILD.gn",
258 ]