telemetry: Add a new tilings page to tough compositor cases.
[chromium-blink-merge.git] / BUILD.gn
blob3b155cfc1094d02ea330727a1d7f957ee1dc2e01
1 # Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
5 # This is the root build file for GN. GN will start processing by loading this
6 # file, and recursively load all dependencies until all dependencies are either
7 # resolved or known not to exist (which will cause the build to fail). So if
8 # you add a new build file, there must be some path of dependencies from this
9 # file to your new one or GN won't know about it.
11 import("//build/config/ui.gni")
12 if (is_android) {
13   import("//build/config/android/config.gni")
16 declare_args() {
17   # A list of extra dependencies to add to the root target. This allows a
18   # checkout to add additional targets without explicitly changing any checked-
19   # in files.
20   root_extra_deps = []
23 # In GN, a "group" is a dummy target that just lists other targets.
24 group("root") {
25   # This should not be linked into production and depends on test targets.
26   testonly = true
28   # Note that some dependencies are commented out. These are things that are
29   # currently written but not hooked up to the build yet. They may need to be
30   # completed or possibly just tested and then re-enabled.
31   deps = [
32     "//apps",
33     "//ash",
34     "//cc",
35     "//cc/blink",
36     "//chrome/browser",
37     "//chrome/browser/devtools",
38     "//chrome/common",
39     "//chrome/plugin",
40     "//chrome/renderer",
41     "//chrome/test",
42     "//chrome/tools",
43     "//chrome/utility",
44     "//components:all_components",
45     "//content",
46     "//content/shell:content_shell",
47     "//content/test:test_support",
48     "//crypto",
49     "//device/battery",
50     "//device/bluetooth",
51     "//device/nfc",
52     "//extensions/browser",
53     "//extensions/common",
54     "//extensions/common/api",
55     "//extensions/renderer",
56     "//gin",
57     "//gpu",
58     "//google_apis",
59     "//google_apis/gcm",
60     "//ipc",
61     "//ipc/mojo",
62     "//jingle:notifier",
63     "//media",
64     "//media/blink",
65     "//media/cast",
66     "//media/mojo",
67     "//mojo",
68     "//net",
69     "//pdf",
70     "//ppapi:ppapi_c",
71     "//printing",
72     "//remoting/client/plugin",
73     "//sandbox",
74     "//sdch",
75     "//skia",
76     "//storage/browser",
77     "//sql",
78     "//sync",
79     "//third_party/WebKit/public:all_blink",
80     "//third_party/angle:translator",
81     "//third_party/brotli",
82     "//third_party/cacheinvalidation",
83     "//third_party/cld",
84     "//third_party/cld_2",
85     "//third_party/ffmpeg",
86     "//third_party/flac",
87     "//third_party/harfbuzz-ng",
88     "//third_party/hunspell",
89     "//third_party/iccjpeg",
90     "//third_party/icu",
91     "//third_party/leveldatabase",
92     "//third_party/libphonenumber",
93     "//third_party/libjingle",
94     "//third_party/libpng",
95     "//third_party/libsrtp",
96     "//third_party/libusb",
97     "//third_party/libwebm",
98     "//third_party/libwebp",
99     "//third_party/libxslt",
100     "//third_party/libvpx",
101     "//third_party/libyuv",
102     "//third_party/lzma_sdk",
103     "//third_party/mesa",
104     "//third_party/opus",
105     "//third_party/ots",
106     "//third_party/protobuf:protobuf_lite",
107     "//third_party/qcms",
108     "//third_party/re2",
109     "//third_party/smhasher:cityhash",
110     "//third_party/smhasher:murmurhash3",
111     "//third_party/smhasher:pmurhash",
112     "//third_party/snappy",
113     "//third_party/speex",
114     "//third_party/usrsctp",
115     "//third_party/widevine/cdm:version_h",
116     "//third_party/webrtc",
117     "//third_party/zlib",
118     "//third_party:jpeg",
119     "//tools/gn",
120     "//tools/imagediff($host_toolchain)",
121     "//ui/accessibility",
122     "//ui/app_list",
123     "//ui/aura",
124     "//ui/base",
125     "//ui/display",
126     "//ui/events",
127     "//ui/gfx",
128     "//ui/gl",
129     "//ui/keyboard",
130     "//ui/native_theme",
131     "//ui/resources",
132     "//ui/snapshot",
133     "//ui/strings",
134     "//ui/surface",
135     "//ui/views",
136     "//ui/views/controls/webview",
137     "//ui/web_dialogs",
138     "//url",
139     "//v8:v8",
140   ] + root_extra_deps
142   if (!is_win) {
143     deps += [ "//breakpad:symupload" ]
144   }
146   if (is_linux) {
147     deps += [
148       "//dbus",
149       "//third_party/fontconfig",
150       "//third_party/freetype2",
151     ]
152   }
154   if (use_x11) {
155     deps += [ "//tools/xdisplaycheck" ]
156   }
158   if (use_aura) {
159     deps += [ "//ui/wm" ]
160   }
162   if (is_win) {
163     deps += [
164       "//ui/metro_viewer",
165     ]
166   }
168   if (is_win || is_mac || is_chromeos) {
169     # RLZ works on these platforms.
170     deps += [
171       "//rlz:rlz_lib",
172     ]
173   }
175   if (cpu_arch == "x86" || cpu_arch == "x64") {
176     # YASM is x86/x64 only.
177     deps += [ "//third_party/yasm($host_toolchain)" ]
178   }
180   if (is_android) {
181     deps += [
182       "//base/android/linker:chromium_android_linker",
183       "//build/android/rezip",
184       "//third_party/openmax_dl/dl",
185       "//content/shell/android:content_shell_apk",
186       "//chrome/android:chrome_shell_apk",
187       "//chrome/test/chromedriver/test/webview_shell:chromedriver_webview_shell_apk",
188       "//ui/android:ui_java",
189       "//third_party/android_tools:android_gcm_java",
190       "//third_party/android_tools:uiautomator_java",
191       "//third_party/android_tools:android_support_v13_java",
192       "//third_party/android_tools:android_support_v7_appcompat_java",
193       "//third_party/android_tools:android_support_v7_mediarouter_java",
194       "//third_party/eyesfree:eyesfree_java",
195     ]
197     if (has_chrome_android_internal) {
198       deps += [
199         "//clank",
200       ]
201     }
203     # TODO(GYP): Move the targets in the rest of this block that still
204     # need to be made to work in the GN build to the bottom of the file
205     # so that all the remaining work is located in one place in the file.
206     # This block should contain only the targets that aren't actually
207     # needed on Android.
209     deps -= [
210       "//apps",  # Needs testing.
211       "//chrome/browser",
212       "//chrome/browser/devtools",
213       "//chrome/common",
214       "//chrome/plugin",
215       "//chrome/renderer",
216       "//chrome/test",
217       "//chrome/tools",
218       "//chrome/utility",
219       "//content/shell:content_shell",
220       "//extensions/browser",
221       "//extensions/common",
222       "//extensions/common/api",
223       "//extensions/renderer",
224       "//pdf",  # Not compiled on Android in GYP yet, either.
225       "//ppapi:ppapi_c",
226       "//third_party/libusb",
227       "//ui/keyboard",  # Blocked on content.
229       # Seems to not be compiled on Android. Otherwise it will need a config.h.
230       "//third_party/libxslt",
232       # Not relevant to Android.
233       "//ash",
234       "//tools/gn",
235       "//ui/aura",
236       "//ui/display",
237       "//ui/views",
238       "//ui/views/controls/webview",
240       # Fails on Android for unknown reasons.
241       "//third_party/flac",
242       "//breakpad:symupload",
244       # Not tested on Android yet:
245       "//google_apis/gcm",
246       "//remoting/client/plugin",
247       "//storage/browser",
248       "//third_party/cld_2",
249       "//third_party/ffmpeg",
250       "//ui/app_list",
251       "//ui/web_dialogs",
252     ]
253   }
255   if (use_ozone) {
256     deps += [
257       "//ui/ozone",
258       "//ui/ozone/demo",
259     ]
260   }
262   # Non-mobile builds.
263   if (!is_android && !is_ios) {
264     deps += [
265       "//device/usb",
266     ]
267   }
269   # 
270   # TODO(GYP): Make everything below this work in the GN build.
271   #
273   if (is_mac) {
274     # TODO(dpranke): Need to fix the unused function errors in breakpad.
275     deps -= [
276       "//breakpad:symupload"
277     ]
279     # TODO(dpranke): These need a webrtc fix in order to build.
280     deps -= [
281       "//jingle:notifier",
282       "//third_party/libjingle",
283       "//third_party/webrtc",
284     ]
286     # TODO(dpranke): These depend on Blink and need Blink fixes to build.
287     deps -= [
288       "//cc/blink",
289       "//content",
290       "//content/test:test_support",
291       "//media/blink",
292       "//pdf",
293       "//ppapi:ppapi_c",
294       "//third_party/WebKit/public:all_blink",
295       "//ui/app_list",
296     ]
298     # TODO(dpranke): These are as-yet untriaged but need at least the above.
299     deps -= [
300       "//apps",
301       "//ash",
302       "//chrome/browser",
303       "//chrome/browser/devtools",
304       "//chrome/common",
305       "//chrome/plugin",
306       "//chrome/renderer",
307       "//chrome/test",
308       "//chrome/utility",
309       "//components:all_components",
310       "//content/shell:content_shell",
311       "//extensions/browser",
312       "//extensions/common",
313       "//extensions/common/api",
314       "//extensions/renderer",
315       "//remoting/client/plugin",
316       "//third_party/usrsctp",
317       "//ui/aura",
318       "//ui/keyboard",
319       "//ui/views",
320       "//ui/views/controls/webview",
321       "//ui/web_dialogs",
322     ]
323   }
325   if (is_win) {
326     deps -= [
327       "//apps",
328       "//ash",
329       "//chrome/browser",
330       "//chrome/browser/devtools",
331       "//chrome/common",
332       "//chrome/plugin",
333       "//chrome/renderer",
334       "//chrome/test",
335       "//chrome/utility",
336       "//components:all_components",
337       "//cc",
338       "//cc/blink",
339       "//content",
340       "//content/shell:content_shell",
341       "//content/test:test_support",
342       "//device/bluetooth",
343       "//extensions/browser",
344       "//extensions/common",
345       "//extensions/common/api",
346       "//extensions/renderer",
347       "//gpu",
348       "//google_apis",
349       "//google_apis/gcm",
350       "//jingle:notifier",
351       "//media",
352       "//media/blink",
353       "//media/cast",
354       "//media/mojo",
355       "//mojo",
356       "//pdf",
357       "//ppapi:ppapi_c",
358       "//printing",
359       "//remoting/client/plugin",
360       "//sandbox",
361       "//storage/browser",
362       "//sync",
363       "//third_party/WebKit/public:all_blink",
364       "//third_party/angle:translator",
365       "//third_party/leveldatabase",
366       "//third_party/libjingle",
367       "//third_party/usrsctp",
368       "//third_party/webrtc",
369       "//ui/accessibility",
370       "//ui/app_list",
371       "//ui/aura",
372       "//ui/base",
373       "//ui/display",
374       "//ui/events",
375       "//ui/gfx",
376       "//ui/gl",
377       "//ui/keyboard",
378       "//ui/native_theme",
379       "//ui/snapshot",
380       "//ui/surface",
381       "//ui/views",
382       "//ui/views/controls/webview",
383       "//ui/web_dialogs",
384       "//ui/wm",
385     ]
386   }