[M40 Merge][WAYLAND_BRINGUP] Display size for Wayland
[platform/framework/web/chromium-efl.git] / .gn
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.
4
5 import("//build/dotfile_settings.gni")
6 import("//third_party/angle/dotfile_settings.gni")
7
8 # The location of the build configuration file.
9 buildconfig = "//build/config/BUILDCONFIG.gn"
10
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/"
15
16 # These arguments override the default values for items in a declare_args
17 # block. "gn args" in turn can override these.
18 #
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.
24 #
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.
31 default_args = {
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).
36
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",
43
44     # Extra libraries.
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",
50   ]
51   v8_experimental_extra_library_files = []
52   v8_enable_gdbjit = false
53   v8_imminent_deprecation_warnings = false
54
55   # TODO(jochen): Remove this. http://crbug.com/v8/5830,
56   # http://crbug.com/728583.
57   v8_check_microtasks_scopes_consistency = false
58
59   # Don't include webrtc's builtin task queue implementation.
60   rtc_link_task_queue_impl = false
61
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
66
67   # Changes some setup for the Crashpad build to set them to build against
68   # Chromium's zlib, base, etc.
69   crashpad_dependencies = "chromium"
70 }
71
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".
76 check_targets = [
77   #"//apps/*",  # Medium-hard.
78   "//ash/*",
79   "//base/*",
80   "//blink/*",
81   "//build/*",
82   "//cc/*",
83
84   #"//chrome/*",  # Epic number of errors.
85   "//chrome/app/*",
86   "//chrome/app_shim/*",
87   "//chrome/browser/chromeos/*",
88   "//chrome/browser/extensions/*",
89   "//chrome/browser/ui/*",
90   "//chrome/common/*",
91   "//chrome/installer/*",
92   "//chrome/profiling",
93   "//chrome/third_party/mozilla_security_manager/*",
94   "//chrome/tools/*",
95   "//chrome/utility/*",
96   "//chromecast/*",
97   "//chromeos/*",
98   "//chrome_elf/*",
99   "//cloud_print/*",
100   "//components/*",
101   "//content/*",
102   "//courgette/*",
103   "//crypto/*",
104   "//data/*",
105   "//dbus/*",
106   "//device/*",
107
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/*",
117   "//gin/*",
118   "//google_apis/*",
119   "//google_update/*",
120   "//gpu/*",
121
122   "//ios/*",
123   "//ios_internal/*",
124   "//ipc/*",
125
126   #"//jingle/*",
127   "//mash/*",
128
129   "//media/*",
130   "//mojo/*",
131
132   #"//native_client/*",
133   "//net/*",
134
135   #"//pdf/*",  # Medium-hard.
136   #"//ppapi/*",  # Lots of errors.
137   "//ppapi/examples/*",
138   "//ppapi/tests/*",
139   "//printing/*",
140
141   #"//remoting/*",  # Medium-hard.
142   "//rlz/*",
143
144   #"//sandbox/*",  # Medium-hard.
145   "//services/*",
146   "//skia/*",
147   "//sql/*",
148   "//storage/*",
149   "//testing/*",
150
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/*",
156
157   #"//third_party/libaddressinput/*",  # Small errors.
158   "//third_party/libphonenumber/*",
159
160   #"//third_party/libwebp/*",  # Errors: https://crbug.com/800762
161   "//third_party/snappy/*",
162
163   #"//third_party/WebKit/*",  # Errors: https://crbug.com/800764
164   #"//third_party/webrtc/*",  # Errors: https://crbug.com/824831
165   "//third_party/webrtc_overrides/*",
166   "//tools/*",
167
168   "//ui/*",
169   "//url/*",
170
171   #"//v8/*",  # Errors: https://bugs.chromium.org/p/v8/issues/detail?id=7330
172   "//webrunner/*",
173 ]
174
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
177 # discouraged.
178 #
179 # GYPI_TO_GN
180 #
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.
185 #
186 # PLEASE READ
187 #
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:
194 #
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:
200 #
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.
204 #
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.
209 #
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
214 #      life).
215 #
216 # - Do not use a script to iterate files in a directory (glob):
217 #
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.
221 #
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.
225 #
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.
236
237 exec_script_whitelist =
238     build_dotfile_settings.exec_script_whitelist +
239     angle_dotfile_settings.exec_script_whitelist +
240     [
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",
246
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",
251
252       "//remoting/host/installer/linux/BUILD.gn",
253       "//remoting/remoting_version.gni",
254       "//remoting/host/installer/win/generate_clsids.gni",
255
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",
259
260       "//tools/grit/grit_rule.gni",
261
262       # Not gypi-to-gn.
263       "//google_apis/BUILD.gn",
264       "//printing/BUILD.gn",
265     ]