Revert "Use the libc clone wrapper in sys_clone."
[chromium-blink-merge.git] / BUILD.gn
blob327088956275c92b101abca2b2288a81fbeba266
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     "//device/vibration",
53     "//extensions/browser",
54     "//extensions/common",
55     "//extensions/common/api",
56     "//extensions/renderer",
57     "//gin",
58     "//gpu",
59     "//google_apis",
60     "//google_apis/gcm",
61     "//ipc",
62     "//ipc/mojo",
63     "//jingle:notifier",
64     "//media",
65     "//media/blink",
66     "//media/cast",
67     "//media/mojo",
68     "//mojo",
69     "//net",
70     "//pdf",
71     "//ppapi:ppapi_c",
72     "//printing",
73     "//remoting/client/plugin",
74     "//sandbox",
75     "//sdch",
76     "//skia",
77     "//storage/browser",
78     "//sql",
79     "//sync",
80     "//third_party/WebKit/public:all_blink",
81     "//third_party/angle:translator",
82     "//third_party/brotli",
83     "//third_party/cacheinvalidation",
84     "//third_party/cld",
85     "//third_party/cld_2",
86     "//third_party/ffmpeg",
87     "//third_party/flac",
88     "//third_party/harfbuzz-ng",
89     "//third_party/hunspell",
90     "//third_party/iccjpeg",
91     "//third_party/icu",
92     "//third_party/leveldatabase",
93     "//third_party/libphonenumber",
94     "//third_party/libjingle",
95     "//third_party/libpng",
96     "//third_party/libsrtp",
97     "//third_party/libusb",
98     "//third_party/libwebm",
99     "//third_party/libwebp",
100     "//third_party/libxslt",
101     "//third_party/libvpx",
102     "//third_party/libyuv",
103     "//third_party/lzma_sdk",
104     "//third_party/mesa",
105     "//third_party/opus",
106     "//third_party/ots",
107     "//third_party/protobuf:protobuf_lite",
108     "//third_party/qcms",
109     "//third_party/re2",
110     "//third_party/smhasher:cityhash",
111     "//third_party/smhasher:murmurhash3",
112     "//third_party/smhasher:pmurhash",
113     "//third_party/snappy",
114     "//third_party/speex",
115     "//third_party/usrsctp",
116     "//third_party/widevine/cdm:version_h",
117     "//third_party/webrtc",
118     "//third_party/zlib",
119     "//third_party:jpeg",
120     "//tools/gn",
121     "//tools/imagediff($host_toolchain)",
122     "//ui/accessibility",
123     "//ui/app_list",
124     "//ui/aura",
125     "//ui/base",
126     "//ui/display",
127     "//ui/events",
128     "//ui/gfx",
129     "//ui/gl",
130     "//ui/keyboard",
131     "//ui/native_theme",
132     "//ui/resources",
133     "//ui/snapshot",
134     "//ui/strings",
135     "//ui/surface",
136     "//ui/touch_selection",
137     "//ui/views",
138     "//ui/views/controls/webview",
139     "//ui/web_dialogs",
140     "//url",
141     "//v8:v8",
142   ]
143   deps += root_extra_deps
145   if (!is_win) {
146     deps += [ "//breakpad:symupload" ]
147   }
149   if (is_linux) {
150     deps += [
151       "//dbus",
152       "//third_party/fontconfig",
153       "//third_party/freetype2",
154     ]
155   }
157   if (use_x11) {
158     deps += [ "//tools/xdisplaycheck" ]
159   }
161   if (use_aura) {
162     deps += [ "//ui/wm" ]
163   }
165   if (is_win) {
166     deps += [ "//ui/metro_viewer" ]
167   }
169   if (is_win || is_mac || is_chromeos) {
170     # RLZ works on these platforms.
171     deps += [ "//rlz:rlz_lib" ]
172   }
174   if (cpu_arch == "x86" || cpu_arch == "x64") {
175     # YASM is x86/x64 only.
176     deps += [ "//third_party/yasm($host_toolchain)" ]
177   }
179   if (is_android) {
180     deps += [
181       "//base/android/linker:chromium_android_linker",
182       "//build/android/gyp/test:hello_world",
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:test_support_unit",
188       "//chrome/test/chromedriver/test/webview_shell:chromedriver_webview_shell_apk",
189       "//ui/android:ui_java",
190       "//third_party/android_tools:android_gcm_java",
191       "//third_party/android_tools:uiautomator_java",
192       "//third_party/android_tools:android_support_v13_java",
193       "//third_party/android_tools:android_support_v7_appcompat_java",
194       "//third_party/android_tools:android_support_v7_mediarouter_java",
195       "//third_party/mockito:mockito_java",
196     ]
198     if (has_chrome_android_internal) {
199       deps += [ "//clank" ]
200     }
202     # TODO(GYP): Move the targets in the rest of this block that still
203     # need to be made to work in the GN build to the bottom of the file
204     # so that all the remaining work is located in one place in the file.
205     # This block should contain only the targets that aren't actually
206     # needed on Android.
208     deps -= [
209       "//apps",  # Needs testing.
210       "//chrome/browser",
211       "//chrome/browser/devtools",
212       "//chrome/common",
213       "//chrome/plugin",
214       "//chrome/renderer",
215       "//chrome/test",
216       "//chrome/tools",
217       "//chrome/utility",
218       "//content/shell:content_shell",
219       "//extensions/browser",
220       "//extensions/common",
221       "//extensions/common/api",
222       "//extensions/renderer",
223       "//pdf",  # Not compiled on Android in GYP yet, either.
224       "//ppapi:ppapi_c",
225       "//third_party/libusb",
226       "//ui/keyboard",  # Blocked on content.
228       # Seems to not be compiled on Android. Otherwise it will need a config.h.
229       "//third_party/libxslt",
231       # Not relevant to Android.
232       "//ash",
233       "//tools/gn",
234       "//ui/aura",
235       "//ui/display",
236       "//ui/views",
237       "//ui/views/controls/webview",
239       # Fails on Android for unknown reasons.
240       "//third_party/flac",
241       "//breakpad:symupload",
243       # Not tested on Android yet:
244       "//google_apis/gcm",
245       "//remoting/client/plugin",
246       "//storage/browser",
247       "//third_party/cld_2",
248       "//third_party/ffmpeg",
249       "//ui/app_list",
250       "//ui/web_dialogs",
251     ]
252   }
254   if (use_ozone) {
255     deps += [
256       "//ui/ozone",
257       "//ui/ozone/demo",
258     ]
259   }
261   # Non-mobile builds.
262   if (!is_android && !is_ios) {
263     deps += [
264       "//device/usb",
265       "//third_party/pdfium/samples",
266     ]
267   }
269   #
270   # TODO(GYP): Make everything below this work in the GN build.
271   #
273   if (is_mac) {
274     # TODO(dpranke): These are as-yet untriaged but need at least the above.
275     deps -= [
276       "//apps",
277       "//ash",
278       "//chrome/browser",
279       "//chrome/browser/devtools",
280       "//chrome/common",
281       "//chrome/plugin",
282       "//chrome/renderer",
283       "//chrome/test",
284       "//chrome/utility",
285       "//components:all_components",
286       "//content/shell:content_shell",
287       "//extensions/browser",
288       "//extensions/common",
289       "//extensions/common/api",
290       "//extensions/renderer",
291       "//remoting/client/plugin",
292       "//third_party/usrsctp",
293       "//ui/app_list",
294       "//ui/aura",
295       "//ui/keyboard",
296       "//ui/views",
297       "//ui/views/controls/webview",
298       "//ui/web_dialogs",
299     ]
300   }
302   if (is_mac || is_ios) {
303     deps -= [
304       "//ui/touch_selection",
305     ]
306   }
308   if (is_win) {
309     deps -= [
310       "//apps",
311       "//ash",
312       "//chrome/browser",
313       "//chrome/browser/devtools",
314       "//chrome/common",
315       "//chrome/plugin",
316       "//chrome/renderer",
317       "//chrome/test",
318       "//chrome/utility",
319       "//components:all_components",
320       "//cc",
321       "//cc/blink",
322       "//content",
323       "//content/shell:content_shell",
324       "//content/test:test_support",
325       "//device/bluetooth",
326       "//extensions/browser",
327       "//extensions/common",
328       "//extensions/common/api",
329       "//extensions/renderer",
330       "//gpu",
331       "//google_apis",
332       "//google_apis/gcm",
333       "//jingle:notifier",
334       "//media",
335       "//media/blink",
336       "//media/cast",
337       "//media/mojo",
338       "//mojo",
339       "//pdf",
340       "//ppapi:ppapi_c",
341       "//printing",
342       "//remoting/client/plugin",
343       "//sandbox",
344       "//storage/browser",
345       "//sync",
346       "//third_party/WebKit/public:all_blink",
347       "//third_party/angle:translator",
348       "//third_party/ffmpeg",
349       "//third_party/leveldatabase",
350       "//third_party/libjingle",
351       "//third_party/usrsctp",
352       "//third_party/webrtc",
353       "//ui/accessibility",
354       "//ui/app_list",
355       "//ui/aura",
356       "//ui/base",
357       "//ui/display",
358       "//ui/events",
359       "//ui/gfx",
360       "//ui/gl",
361       "//ui/keyboard",
362       "//ui/native_theme",
363       "//ui/snapshot",
364       "//ui/surface",
365       "//ui/touch_selection",
366       "//ui/views",
367       "//ui/views/controls/webview",
368       "//ui/web_dialogs",
369       "//ui/wm",
370     ]
371   }