Allow supervised users to delete profiles in about:settings.
[chromium-blink-merge.git] / BUILD.gn
blobe47ef757b7abc16dcb050d168a15e189ecd87ea3
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/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/touch_selection",
136     "//ui/views",
137     "//ui/views/controls/webview",
138     "//ui/web_dialogs",
139     "//url",
140     "//v8:v8",
141   ]
142   deps += root_extra_deps
144   if (!is_win) {
145     deps += [ "//breakpad:symupload" ]
146   }
148   if (is_linux) {
149     deps += [
150       "//dbus",
151       "//third_party/fontconfig",
152       "//third_party/freetype2",
153     ]
154   }
156   if (use_x11) {
157     deps += [ "//tools/xdisplaycheck" ]
158   }
160   if (use_aura) {
161     deps += [ "//ui/wm" ]
162   }
164   if (is_win) {
165     deps += [ "//ui/metro_viewer" ]
166   }
168   if (is_win || is_mac || is_chromeos) {
169     # RLZ works on these platforms.
170     deps += [ "//rlz:rlz_lib" ]
171   }
173   if (cpu_arch == "x86" || cpu_arch == "x64") {
174     # YASM is x86/x64 only.
175     deps += [ "//third_party/yasm($host_toolchain)" ]
176   }
178   if (is_android) {
179     deps += [
180       "//base/android/linker:chromium_android_linker",
181       "//build/android/gyp/test:hello_world",
182       "//build/android/rezip",
183       "//third_party/openmax_dl/dl",
184       "//content/shell/android:content_shell_apk",
185       "//chrome/android:chrome_shell_apk",
186       "//chrome/test:test_support_unit",
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/mockito:mockito_java",
195     ]
197     if (has_chrome_android_internal) {
198       deps += [ "//clank" ]
199     }
201     # TODO(GYP): Move the targets in the rest of this block that still
202     # need to be made to work in the GN build to the bottom of the file
203     # so that all the remaining work is located in one place in the file.
204     # This block should contain only the targets that aren't actually
205     # needed on Android.
207     deps -= [
208       "//apps",  # Needs testing.
209       "//chrome/browser",
210       "//chrome/browser/devtools",
211       "//chrome/common",
212       "//chrome/plugin",
213       "//chrome/renderer",
214       "//chrome/test",
215       "//chrome/tools",
216       "//chrome/utility",
217       "//content/shell:content_shell",
218       "//extensions/browser",
219       "//extensions/common",
220       "//extensions/common/api",
221       "//extensions/renderer",
222       "//pdf",  # Not compiled on Android in GYP yet, either.
223       "//ppapi:ppapi_c",
224       "//third_party/libusb",
225       "//ui/keyboard",  # Blocked on content.
227       # Seems to not be compiled on Android. Otherwise it will need a config.h.
228       "//third_party/libxslt",
230       # Not relevant to Android.
231       "//ash",
232       "//tools/gn",
233       "//ui/aura",
234       "//ui/display",
235       "//ui/views",
236       "//ui/views/controls/webview",
238       # Fails on Android for unknown reasons.
239       "//third_party/flac",
240       "//breakpad:symupload",
242       # Not tested on Android yet:
243       "//google_apis/gcm",
244       "//remoting/client/plugin",
245       "//storage/browser",
246       "//third_party/cld_2",
247       "//third_party/ffmpeg",
248       "//ui/app_list",
249       "//ui/web_dialogs",
250     ]
251   }
253   if (use_ozone) {
254     deps += [
255       "//ui/ozone",
256       "//ui/ozone/demo",
257     ]
258   }
260   # Non-mobile builds.
261   if (!is_android && !is_ios) {
262     deps += [
263       "//device/usb",
264       "//third_party/pdfium/samples",
265     ]
266   }
268   #
269   # TODO(GYP): Make everything below this work in the GN build.
270   #
272   if (is_mac) {
273     # TODO(dpranke): These are as-yet untriaged but need at least the above.
274     deps -= [
275       "//apps",
276       "//ash",
277       "//chrome/browser",
278       "//chrome/browser/devtools",
279       "//chrome/common",
280       "//chrome/plugin",
281       "//chrome/renderer",
282       "//chrome/test",
283       "//chrome/utility",
284       "//components:all_components",
285       "//content/shell:content_shell",
286       "//extensions/browser",
287       "//extensions/common",
288       "//extensions/common/api",
289       "//extensions/renderer",
290       "//remoting/client/plugin",
291       "//third_party/usrsctp",
292       "//ui/app_list",
293       "//ui/aura",
294       "//ui/keyboard",
295       "//ui/views",
296       "//ui/views/controls/webview",
297       "//ui/web_dialogs",
298     ]
299   }
301   if (is_mac || is_ios) {
302     deps -= [ "//ui/touch_selection" ]
303   }