ui: Simplify Reflector and browser OutputSurfaces for single thread.
[chromium-blink-merge.git] / BUILD.gn
blob700ff9c1f77c5ce8ed7f300d42181dc46e1d2449
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/features.gni")
12 import("//build/config/ui.gni")
14 if (is_android) {
15   import("//build/config/android/config.gni")
18 declare_args() {
19   # A list of extra dependencies to add to the root target. This allows a
20   # checkout to add additional targets without explicitly changing any checked-
21   # in files.
22   root_extra_deps = []
25 group("gyp_all") {
26   testonly = true
28   # TODO(GYP): This target should describe everything that is built by a GYP
29   # build but not yet by a GN build, i.e., these are the targets that still
30   # need to be ported to GN. Eventually this target should be identical to
31   # gn_all.
33   deps = [
34     ":gn_all",
35     # "//components:components_browsertests", # TODO(GYP)
36     # "//components/nacl:nacl_loader_unittests", # TODO(GYP)
37     # "//google_apis:google_apis_unittests", # TODO(GYP)
38     # "//ui/compositor:compositor_unittests", # TODO(GYP)
39     # "//device:device_unittests", # TODO(GYP)
40     # "//ppapi:ppapi_unittests", # TODO(GYP)
41     # "//remoting:remoting_unittests",  # TODO(GYP)
42   ]
45 # The "gn_all" target matches the "gn_all" target in build/all.gyp.
46 # It is not (yet!) the same as building "all".
47 # TODO(GYP): Make it be basically the same as building all, or at least
48 # be sure that we don't want any of the stuff listed in gn_all to
49 # be built by default.
51 # In GN, a "group" is a dummy target that just lists other targets.
52 group("gn_all") {
53   testonly = true
55   deps = [
56     "//base:base_unittests",
57     "//cc:cc_unittests",
58     "//chrome",
59     "//chrome/test:browser_tests",
60     "//chrome/test:interactive_ui_tests",
61     "//chrome/test:sync_integration_tests",
62     "//chrome/test:unit_tests",
63     "//chrome/test/chromedriver:chromedriver_unittests",
64     "//components:components_unittests",
65     "//content/shell:content_shell",
66     "//content/test:content_browsertests",
67     "//content/test:content_perftests",
68     "//content/test:content_unittests",
69     "//crypto:crypto_unittests",
70     "//extensions:extensions_browsertests",
71     "//extensions:extensions_unittests",
72     "//google_apis/gcm:gcm_unit_tests",
73     "//gpu:gpu_unittests",
74     "//ipc:ipc_tests",
75     "//ipc/mojo:ipc_mojo_unittests",
76     "//jingle:jingle_unittests",
77     "//media:media_unittests",
78     "//media/mojo",  # only builds in mojo
79     "//media/cast:cast_unittests",
80     "//mojo",
81     "//mojo/common:mojo_common_unittests",
83     # "//mojo/services/html_viewer:tests",  # TODO(GYP): Do we need this?
84     "//net:net_unittests",
85     "//ppapi/examples",  # TODO(GYP): What's the GYP equivalent?
86     "//printing:printing_unittests",
87     "//skia:skia_unittests",
88     "//sql:sql_unittests",
89     "//sync:sync_unit_tests",
91     # TODO(GYP): the Blink test targets should be public, but
92     # currently aren't. all_blink pulls them in, though.
93     # "//third_party/WebKit/Source/platform:heap_unittests",
94     # "//third_party/WebKit/Source/platform:platform_unittests",
95     # "//third_party/WebKit/Source/wtf:wtf_unittests",
96     "//third_party/WebKit/public:all_blink",
97     "//third_party/cacheinvalidation:cacheinvalidation_unittests",
99     # TODO(GYP): This is needed only w/ cld_version==1. What configs set that?
100     "//third_party/cld",
101     "//third_party/codesighs",
103     # TODO(GYP): This is needed only w/ use_system_fontconfig==0.
104     # What configs set that?
105     # "//third_party/fontconfig",
107     # TODO(GYP): This will be pulled in automatically when enable_webrtc==true.
108     # For now pull it in manually so that it doesn't regress.
109     "//third_party/libsrtp",
110     "//third_party/mojo/src/mojo/edk/system:mojo_system_unittests",
111     "//third_party/mojo/src/mojo/edk/test:mojo_public_bindings_unittests",
112     "//third_party/mojo/src/mojo/edk/test:mojo_public_environment_unittests",
113     "//third_party/mojo/src/mojo/edk/test:mojo_public_system_unittests",
114     "//third_party/mojo/src/mojo/edk/test:mojo_public_utility_unittests",
115     "//third_party/pdfium/samples:pdfium_test",
117     # TODO(GYP): Verify that this is no longer needed.
118     "//third_party/smhasher:pmurhash",
120     # TODO(GYP): This will be pulled in automatically when enable_webrtc==true.
121     # For now pull it in manually so that it doesn't regress.
122     "//third_party/usrsctp",
123     "//tools/imagediff($host_toolchain)",
124     "//tools/gn",
125     "//tools/gn:gn_unittests",
126     "//tools/telemetry:bitmaptools($host_toolchain)",
127     "//ui/accessibility:accessibility_unittests",
128     "//ui/app_list:app_list_unittests",
129     "//ui/base:ui_base_unittests",
130     "//ui/display:display_unittests",
131     "//ui/events:events_unittests",
132     "//ui/gfx:gfx_unittests",
133     "//ui/touch_selection:ui_touch_selection_unittests",
134     "//url:url_unittests",
135   ]
137   deps += root_extra_deps
139   # TODO(GYP): Get this working on the mac?
140   if (enable_extensions && !is_mac) {
141     deps += [ "//extensions/shell:app_shell_unittests" ]
142   }
144   if (!is_win) {
145     deps += [ "//breakpad:symupload" ]
146   }
148   if (use_x11) {
149     deps += [ "//tools/xdisplaycheck" ]
150   }
152   if (toolkit_views) {
153     deps += [ "//ui/views:views_unittests" ]
154   }
156   if (use_aura) {
157     deps += [ "//ui/wm:wm_unittests" ]
158   }
160   if (use_ozone) {
161     deps += [
162       "//ui/ozone",
163       "//ui/ozone/demo",  # GN only
164     ]
165   }
167   if (is_win || is_mac || is_chromeos) {
168     # RLZ works on these platforms.
169     # TODO(GYP): Is this target needed, or pulled in automatically?
170     deps += [ "//rlz:rlz_lib" ]
171   }
173   if (is_android) {
174     deps += [
175       "//base/android/linker:chromium_android_linker",
176       "//build/android/gyp/test:hello_world",
177       "//build/android/rezip",
178       "//chrome/android:chrome_shell_apk",
179       "//chrome/test/chromedriver/test/webview_shell:chromedriver_webview_shell_apk",
180       "//tools/imagediff($host_toolchain)",
182       # TODO(GYP): Remove these when the components_unittests work.
183       "//components/history/core/test:test",
184       "//components/policy:policy_component_test_support",
185       "//components/policy:test_support",
186       "//components/rappor:test_support",
187       "//components/signin/core/browser:test_support",
188       "//components/sync_driver:test_support",
189       "//components/user_manager",
190       "//components/wallpaper",
191       "//content/shell/android:content_shell_apk",
193       # TODO(GYP): Are these needed, or will they be pulled in automatically?
194       "//third_party/android_tools:android_gcm_java",
195       "//third_party/android_tools:uiautomator_java",
196       "//third_party/android_tools:android_support_v13_java",
197       "//third_party/android_tools:android_support_v7_appcompat_java",
198       "//third_party/android_tools:android_support_v7_mediarouter_java",
199       "//third_party/mesa",
200       "//third_party/mockito:mockito_java",
201       "//third_party/openmax_dl/dl",
202       "//third_party/speex",
203       "//ui/android:ui_java",
205       # TODO(GYP): Are these needed?
206       "//chrome/test:test_support_unit",
207       "//third_party/smhasher:murmurhash3",
208       "//ui/message_center:test_support",
209     ]
210     deps -= [
211       "//breakpad:symupload",  # TODO(GYP) ??
212       "//chrome",  # TODO(GYP) ??
213       "//chrome/test:browser_tests",  # TODO(GYP) ??
214       "//chrome/test:interactive_ui_tests",  # TODO(GYP) ??
215       "//chrome/test:sync_integration_tests",  # TODO(GYP) ??
216       "//chrome/test:unit_tests",  # TODO(GYP)
217       "//extensions:extensions_browsertests",
218       "//extensions:extensions_unittests",
219       "//google_apis/gcm:gcm_unit_tests",
220       "//ipc:ipc_tests",  # TODO(GYP) ??
221       "//jingle:jingle_unittests",  # TODO(GYP) ??
222       "//net:net_unittests",
223       "//ppapi/examples",
224       "//third_party/pdfium/samples:pdfium_test",
225       "//tools/gn",
226       "//tools/gn:gn_unittests",
227       "//ui/app_list:app_list_unittests",
228       "//url:url_unittests",
229     ]
231     if (has_chrome_android_internal) {
232       deps += [ "//clank" ]  # TODO(GYP) ??
233     }
234   } else if (is_linux) {
235     deps += [
236       "//dbus:dbus_unittests",
237       "//sandbox/linux:sandbox_linux_unittests",
238     ]
239   } else if (is_mac) {
240     deps += [
241       "//third_party/apple_sample_code",
242       "//third_party/molokocacao",
243     ]
245     # TODO(GYP): Remove these when the targets below work and these
246     # are pulled in automatically.
247     deps += [
248       "//cc/blink",
249       "//components/ui/zoom:ui_zoom",
250       "//content",
251       "//content/test:test_support",
252       "//device/battery",
253       "//device/bluetooth",
254       "//device/nfc",
255       "//device/usb",
256       "//device/vibration",
257       "//media/blink",
258       "//pdf",
259       "//storage/browser",
260       "//third_party/brotli",
261       "//third_party/flac",
262       "//third_party/hunspell",
263       "//third_party/iccjpeg",
264       "//third_party/libphonenumber",
265       "//third_party/ots",
266       "//third_party/qcms",
267       "//third_party/smhasher:murmurhash3",
268       "//third_party/speex",
269       "//third_party/webrtc/system_wrappers",
270       "//ui/native_theme",
271       "//ui/snapshot",
272       "//ui/surface",
273     ]
275     # TODO(dpranke): These are as-yet untriaged but need at least the above.
276     deps -= [
277       "//chrome",  # TODO(GYP)
278       "//chrome/test:browser_tests",  # TODO(GYP)
279       "//chrome/test:interactive_ui_tests",  # TODO(GYP)
280       "//chrome/test:sync_integration_tests",  # TODO(GYP)
281       "//chrome/test:unit_tests",  # TODO(GYP)
282       "//components:components_unittests",  # TODO(GYP)
283       "//content/test:content_browsertests",  # TODO(GYP)
284       "//content/test:content_perftests",  # TODO(GYP)
285       "//content/test:content_unittests",  # TODO(GYP)
286       "//extensions:extensions_browsertests",  # TODO(GYP)
287       "//extensions:extensions_unittests",  # TODO(GYP)
288       "//net:net_unittests",  # TODO(GYP)
289       "//third_party/usrsctp",  # TODO(GYP)
290       "//ui/app_list:app_list_unittests",  # TODO(GYP)
291       "//ui/gfx:gfx_unittests",  # TODO(GYP)
292     ]
293   } else if (is_win) {
294     deps += [ "//ui/metro_viewer" ]
295     deps -= [
296       "//crypto:crypto_unittests",  # TODO(GYP)
297       "//net:net_unittests",  # TODO(GYP)
298     ]
299   }
302 if (is_linux) {
303   # This group corresponds to the list of tests run on the waterfall for
304   # desktop Linux GYP builds from testing/buildbot/chromium.linux.json. It's
305   # here to help track GYP -> GN conversion progress.
306   group("linux_default_tests") {
307     testonly = true
308     deps = [
309       # components_browsertests  TODO(GYP)
310       # device_unittests  TODO(GYP)
311       # nacl_loader_unittests  TODO(GYP)
312       # ppapi_unittests  TODO(GYP)
313       # remoting_unittests  TODO(GYP)
315       "//base:base_unittests",  # PASSES (*) 2/25/2015
316       "//cc:cc_unittests",  # PASSES 2/25/2015
317       "//chrome/test:browser_tests",
318       "//chrome/test:interactive_ui_tests",
319       "//chrome/test:sync_integration_tests",  # Crashes for brettw in GN and GYP.
320       "//chrome/test:unit_tests",  # PASSES 2/25/2015
321       "//chrome/test/chromedriver:chromedriver_unittests",  # PASSES 2/25/2015
322       "//components:components_unittests",  # TODO(GYP) multiple crashes.
323       "//content/test:content_browsertests",
324       "//content/test:content_unittests",  # PASSES 2/25/2015
325       "//crypto:crypto_unittests",  # PASSES 2/25/2015
326       "//dbus:dbus_unittests",  # PASSES 2/25/2015
327       "//extensions:extensions_browsertests",  # PASSES 2/25/2015
328       "//extensions:extensions_unittests",  # PASSES 2/25/2015
329       "//extensions/shell:app_shell_unittests",  # PASSES 2/25/2015
330       "//google_apis/gcm:gcm_unit_tests",  # PASSES 2/25/2015
331       "//google_apis:google_apis_unittests",  # PASSES 2/25/2015
332       "//gpu:gpu_unittests",  # PASSES 2/25/2015
333       "//ipc:ipc_tests",  # PASSES 2/25/2015
334       "//ipc/mojo:ipc_mojo_unittests",  # PASSES 2/25/2015
335       "//jingle:jingle_unittests",  # PASSES 2/25/2015
336       "//media/cast:cast_unittests",  # PASSES 2/25/2015
337       "//media:media_unittests",  # TODO(GYP) MidiManagerTest fails.
338       "//mojo/common:mojo_common_unittests",  # PASSES 2/25/2015
339       "//net:net_unittests",  # PASSES 2/25/2015
340       "//printing:printing_unittests",  # PASSES 2/25/2015
341       "//sandbox/linux:sandbox_linux_unittests",  # PASSES 2/25/2015
342       "//skia:skia_unittests",  # PASSES 2/25/2015
343       "//sql:sql_unittests",  # PASSES 2/25/2015
344       "//sync:sync_unit_tests",  # PASSES 2/25/2015
345       "//third_party/cacheinvalidation:cacheinvalidation_unittests",  # PASSES 2/25/2015
346       "//third_party/mojo/src/mojo/edk/system:mojo_system_unittests",  # PASSES 2/25/2015
347       "//third_party/mojo/src/mojo/edk/test:mojo_public_bindings_unittests",  # PASSES 2/25/2015
348       "//third_party/mojo/src/mojo/edk/test:mojo_public_environment_unittests",  # PASSES 2/25/2015
349       "//third_party/mojo/src/mojo/edk/test:mojo_public_system_unittests",  # PASSES 2/25/2015
350       "//ui/accessibility:accessibility_unittests",  # PASSES 2/25/2015
351       "//ui/app_list:app_list_unittests",  # PASSES 2/25/2015
352       "//ui/aura:aura_unittests",  # PASSES 2/25/2015
353       "//ui/base:ui_base_unittests",  # TODO(GYP) ResourceBundleTest.* fails.
354       "//ui/compositor:compositor_unittests",  # PASSES 2/25/2015
355       "//ui/display:display_unittests",  # PASSES 2/25/2015
356       "//ui/events:events_unittests",  # PASSES 2/25/2015
357       "//ui/gfx:gfx_unittests",  # PASSES 2/25/2015
358       "//ui/touch_selection:ui_touch_selection_unittests",  # PASSES 2/25/2015
359       "//ui/views:views_unittests",  # PASSES (*) 2/25/2015
360       "//ui/wm:wm_unittests",  # PASSES 2/25/2015
361       "//url:url_unittests",  # PASSES 2/25/2015
363       # Note:
364       # (*) Fails but failures match GYP build at time of testing.
365     ]
366   }