Roll WebRTC 8506:8509, Libjingle 8501:8510
[chromium-blink-merge.git] / BUILD.gn
blobf0ba26da16689036c3a07d5da62689f21caa198a
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     # "//chrome/test:chromedriver_unittests", # TODO(GYP)
36     # "//components:components_browsertests", # TODO(GYP)
37     # "//components/nacl:nacl_loader_unittests", # TODO(GYP)
38     # "//google_apis:google_apis_unittests", # TODO(GYP)
39     # "//ui/compositor:compositor_unittests", # TODO(GYP)
40     # "//device:device_unittests", # TODO(GYP)
41     # "//ppapi:ppapi_unittests", # TODO(GYP)
42     # "//remoting:remoting_unittests",  # TODO(GYP)
43   ]
46 # The "gn_all" target matches the "gn_all" target in build/all.gyp.
47 # It is not (yet!) the same as building "all".
48 # TODO(GYP): Make it be basically the same as building all, or at least
49 # be sure that we don't want any of the stuff listed in gn_all to
50 # be built by default.
52 # In GN, a "group" is a dummy target that just lists other targets.
53 group("gn_all") {
54   testonly = true
56   deps = [
57     "//base:base_unittests",
58     "//cc:cc_unittests",
59     "//chrome",
60     "//chrome/test:browser_tests",
61     "//chrome/test:interactive_ui_tests",
62     "//chrome/test:sync_integration_tests",
63     "//chrome/test:unit_tests",
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   }