ec3d38717a8579608c30af726c9e75010905f80a
[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/resource_coordinator/*",
90   "//chrome/browser/ui/*",
91   "//chrome/chrome_cleaner/*",
92   "//chrome/common/*",
93   "//chrome/installer/*",
94   "//chrome/profiling",
95   "//chrome/third_party/mozilla_security_manager/*",
96   "//chrome/tools/*",
97   "//chrome/utility/*",
98   "//chromecast/*",
99   "//chromeos/*",
100   "//chrome_elf/*",
101   "//cloud_print/*",
102   "//components/*",
103   "//content/*",
104   "//courgette/*",
105   "//crypto/*",
106   "//data/*",
107   "//dbus/*",
108   "//device/*",
109
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/*",
119   "//gin/*",
120   "//google_apis/*",
121   "//google_update/*",
122   "//gpu/*",
123
124   "//ios/*",
125   "//ios_internal/*",
126   "//ipc/*",
127
128   #"//jingle/*",
129   "//mash/*",
130
131   "//media/*",
132   "//mojo/*",
133
134   #"//native_client/*",
135   "//net/*",
136
137   #"//pdf/*",  # Medium-hard.
138   #"//ppapi/*",  # Lots of errors.
139   "//ppapi/examples/*",
140   "//ppapi/tests/*",
141   "//printing/*",
142
143   #"//remoting/*",  # Medium-hard.
144   "//rlz/*",
145
146   #"//sandbox/*",  # Medium-hard.
147   "//services/*",
148   "//skia/*",
149   "//sql/*",
150   "//storage/*",
151   "//testing/*",
152
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/*",
160
161   #"//third_party/libaddressinput/*",  # Small errors.
162   "//third_party/libphonenumber/*",
163
164   #"//third_party/libwebp/*",  # Errors: https://crbug.com/800762
165   "//third_party/snappy/*",
166
167   #"//third_party/WebKit/*",  # Errors: https://crbug.com/800764
168   #"//third_party/webrtc/*",  # Errors: https://crbug.com/824831
169   "//third_party/webrtc_overrides/*",
170   "//tools/*",
171
172   "//ui/*",
173   "//url/*",
174
175   #"//v8/*",  # Errors: https://bugs.chromium.org/p/v8/issues/detail?id=7330
176   "//webrunner/*",
177 ]
178
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
181 # discouraged.
182 #
183 # GYPI_TO_GN
184 #
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.
189 #
190 # PLEASE READ
191 #
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:
198 #
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:
204 #
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.
208 #
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.
213 #
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
218 #      life).
219 #
220 # - Do not use a script to iterate files in a directory (glob):
221 #
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.
225 #
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.
229 #
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.
240
241 exec_script_whitelist =
242     build_dotfile_settings.exec_script_whitelist +
243     angle_dotfile_settings.exec_script_whitelist +
244     [
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",
250
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",
255
256       "//remoting/host/installer/linux/BUILD.gn",
257       "//remoting/remoting_version.gni",
258       "//remoting/host/installer/win/generate_clsids.gni",
259
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",
263
264       "//tools/grit/grit_rule.gni",
265
266       # Not gypi-to-gn.
267       "//google_apis/BUILD.gn",
268       "//printing/BUILD.gn",
269     ]