OLD | NEW |
1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. | 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 | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 # This is the root build file for GN. GN will start processing by loading this | 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 | 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 | 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 | 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. | 9 # file to your new one or GN won't know about it. |
10 | 10 |
11 import("//build/config/features.gni") | 11 import("//build/config/features.gni") |
12 import("//build/config/ui.gni") | 12 import("//build/config/ui.gni") |
13 | |
14 if (is_android) { | 13 if (is_android) { |
15 import("//build/config/android/config.gni") | 14 import("//build/config/android/config.gni") |
16 } | 15 } |
17 | 16 |
18 declare_args() { | 17 declare_args() { |
19 # A list of extra dependencies to add to the root target. This allows a | 18 # 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- | 19 # checkout to add additional targets without explicitly changing any checked- |
21 # in files. | 20 # in files. |
22 root_extra_deps = [] | 21 root_extra_deps = [] |
23 } | 22 } |
24 | 23 |
25 group("gyp_all") { | 24 # In GN, a "group" is a dummy target that just lists other targets. |
| 25 group("root") { |
| 26 # This should not be linked into production and depends on test targets. |
26 testonly = true | 27 testonly = true |
27 | 28 |
28 # TODO(GYP): This target should describe everything that is built by a GYP | 29 # Note that some dependencies are commented out. These are things that are |
29 # build but not yet by a GN build, i.e., these are the targets that still | 30 # currently written but not hooked up to the build yet. They may need to be |
30 # need to be ported to GN. Eventually this target should be identical to | 31 # completed or possibly just tested and then re-enabled. |
31 # gn_all. | |
32 | |
33 deps = [ | 32 deps = [ |
34 ":gn_all", | 33 "//apps", |
35 # "//chrome/test:chromedriver_unittests", # TODO(GYP) | 34 "//ash", |
36 # "//components:components_browsertests", # TODO(GYP) | 35 "//cc", |
37 # "//components/nacl:nacl_loader_unittests", # TODO(GYP) | 36 "//cc/blink", |
38 # "//google_apis:google_apis_unittests", # TODO(GYP) | 37 "//chrome/browser", |
39 # "//ui/compositor:compositor_unittests", # TODO(GYP) | 38 "//chrome/browser/devtools", |
40 # "//device:device_unittests", # TODO(GYP) | 39 "//chrome/common", |
41 # "//ppapi:ppapi_unittests", # TODO(GYP) | 40 "//chrome/plugin", |
42 # "//remoting:remoting_unittests", # TODO(GYP) | 41 "//chrome/renderer", |
| 42 "//chrome/test", |
| 43 "//chrome/tools", |
| 44 "//chrome/utility", |
| 45 "//components:all_components", |
| 46 "//content", |
| 47 "//content/shell:content_shell", |
| 48 "//content/test:test_support", |
| 49 "//crypto", |
| 50 "//device/battery", |
| 51 "//device/bluetooth", |
| 52 "//device/nfc", |
| 53 "//device/vibration", |
| 54 "//extensions/browser", |
| 55 "//extensions/common", |
| 56 "//extensions/common/api", |
| 57 "//extensions/renderer", |
| 58 "//gin", |
| 59 "//gpu", |
| 60 "//google_apis", |
| 61 "//google_apis/gcm", |
| 62 "//ipc", |
| 63 "//ipc/mojo", |
| 64 "//jingle:notifier", |
| 65 "//media", |
| 66 "//media/blink", |
| 67 "//media/cast", |
| 68 "//media/mojo", |
| 69 "//mojo", |
| 70 "//net", |
| 71 "//pdf", |
| 72 "//ppapi/examples", |
| 73 "//printing", |
| 74 "//remoting/client/plugin", |
| 75 "//sandbox", |
| 76 "//sdch", |
| 77 "//skia", |
| 78 "//storage/browser", |
| 79 "//sql", |
| 80 "//sync", |
| 81 "//third_party/WebKit/public:all_blink", |
| 82 "//third_party/angle:translator", |
| 83 "//third_party/brotli", |
| 84 "//third_party/cacheinvalidation", |
| 85 "//third_party/cld", |
| 86 "//third_party/cld_2", |
| 87 "//third_party/codesighs", |
| 88 "//third_party/ffmpeg", |
| 89 "//third_party/flac", |
| 90 "//third_party/harfbuzz-ng", |
| 91 "//third_party/hunspell", |
| 92 "//third_party/iccjpeg", |
| 93 "//third_party/icu", |
| 94 "//third_party/leveldatabase", |
| 95 "//third_party/libphonenumber", |
| 96 "//third_party/libjingle", |
| 97 "//third_party/libpng", |
| 98 "//third_party/libsrtp", |
| 99 "//third_party/libusb", |
| 100 "//third_party/libwebp", |
| 101 "//third_party/libxslt", |
| 102 "//third_party/libvpx", |
| 103 "//third_party/libyuv", |
| 104 "//third_party/lzma_sdk", |
| 105 "//third_party/mesa", |
| 106 "//third_party/opus", |
| 107 "//third_party/ots", |
| 108 "//third_party/protobuf:protobuf_lite", |
| 109 "//third_party/qcms", |
| 110 "//third_party/re2", |
| 111 "//third_party/smhasher:cityhash", |
| 112 "//third_party/smhasher:murmurhash3", |
| 113 "//third_party/smhasher:pmurhash", |
| 114 "//third_party/snappy", |
| 115 "//third_party/speex", |
| 116 "//third_party/usrsctp", |
| 117 "//third_party/widevine/cdm:version_h", |
| 118 "//third_party/webrtc", |
| 119 "//third_party/zlib", |
| 120 "//third_party:jpeg", |
| 121 "//tools/gn", |
| 122 "//tools/imagediff($host_toolchain)", |
| 123 "//tools/telemetry:bitmaptools", |
| 124 "//ui/accessibility", |
| 125 "//ui/app_list", |
| 126 "//ui/aura", |
| 127 "//ui/base", |
| 128 "//ui/display", |
| 129 "//ui/events", |
| 130 "//ui/gfx", |
| 131 "//ui/gl", |
| 132 "//ui/keyboard", |
| 133 "//ui/native_theme", |
| 134 "//ui/resources", |
| 135 "//ui/snapshot", |
| 136 "//ui/strings", |
| 137 "//ui/surface", |
| 138 "//ui/touch_selection", |
| 139 "//ui/views", |
| 140 "//ui/views/controls/webview", |
| 141 "//ui/web_dialogs", |
| 142 "//url", |
| 143 "//v8:v8", |
43 ] | 144 ] |
44 } | |
45 | |
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. | |
51 | |
52 # In GN, a "group" is a dummy target that just lists other targets. | |
53 group("gn_all") { | |
54 testonly = true | |
55 | |
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", | |
82 | |
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", | |
90 | |
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", | |
98 | |
99 # TODO(GYP): This is needed only w/ cld_version==1. What configs set that? | |
100 "//third_party/cld", | |
101 "//third_party/codesighs", | |
102 | |
103 # TODO(GYP): This is needed only w/ use_system_fontconfig==0. | |
104 # What configs set that? | |
105 # "//third_party/fontconfig", | |
106 | |
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", | |
116 | |
117 # TODO(GYP): Verify that this is no longer needed. | |
118 "//third_party/smhasher:pmurhash", | |
119 | |
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 "//ui/views:views_unittests", | |
135 "//url:url_unittests", | |
136 ] | |
137 | |
138 deps += root_extra_deps | 145 deps += root_extra_deps |
139 | 146 |
140 # TODO(GYP): Get this working on the mac? | 147 # TODO(GYP): Get this working on the mac? |
141 if (enable_extensions && !is_mac) { | 148 if (enable_extensions && !is_mac) { |
142 deps += [ "//extensions/shell:app_shell_unittests" ] | 149 deps += [ "//extensions/shell:app_shell_unittests" ] |
143 } | 150 } |
144 | 151 |
145 if (!is_win) { | 152 if (!is_win) { |
146 deps += [ "//breakpad:symupload" ] | 153 deps += [ "//breakpad:symupload" ] |
147 } | 154 } |
148 | 155 |
| 156 if (is_linux) { |
| 157 deps += [ |
| 158 "//dbus", |
| 159 "//third_party/fontconfig", |
| 160 "//third_party/freetype2", |
| 161 ] |
| 162 } |
| 163 |
149 if (use_x11) { | 164 if (use_x11) { |
150 deps += [ "//tools/xdisplaycheck" ] | 165 deps += [ "//tools/xdisplaycheck" ] |
151 } | 166 } |
152 | 167 |
153 if (use_aura) { | 168 if (use_aura) { |
154 deps += [ "//ui/wm:wm_unittests" ] | 169 deps += [ "//ui/wm" ] |
155 } | 170 } |
156 | 171 |
157 if (use_ozone) { | 172 if (is_win) { |
158 deps += [ | 173 deps += [ "//ui/metro_viewer" ] |
159 "//ui/ozone", # TODO(GYP) Needed?? | |
160 "//ui/ozone/demo", # TODO(GYP) Needed?? | |
161 ] | |
162 } | 174 } |
163 | 175 |
164 if (is_win || is_mac || is_chromeos) { | 176 if (is_win || is_mac || is_chromeos) { |
165 # RLZ works on these platforms. | 177 # RLZ works on these platforms. |
166 # TODO(GYP): Is this target needed, or pulled in automatically? | |
167 deps += [ "//rlz:rlz_lib" ] | 178 deps += [ "//rlz:rlz_lib" ] |
168 } | 179 } |
169 | 180 |
| 181 if (current_cpu == "x86" || current_cpu == "x64") { |
| 182 # YASM is x86/x64 only. |
| 183 deps += [ "//third_party/yasm($host_toolchain)" ] |
| 184 } |
| 185 |
170 if (is_android) { | 186 if (is_android) { |
171 deps += [ | 187 deps += [ |
172 "//base/android/linker:chromium_android_linker", | 188 "//base/android/linker:chromium_android_linker", |
173 "//build/android/gyp/test:hello_world", | 189 "//build/android/gyp/test:hello_world", |
174 "//build/android/rezip", | 190 "//build/android/rezip", |
| 191 "//third_party/openmax_dl/dl", |
| 192 "//content/shell/android:content_shell_apk", |
175 "//chrome/android:chrome_shell_apk", | 193 "//chrome/android:chrome_shell_apk", |
| 194 "//chrome/test:test_support_unit", |
176 "//chrome/test/chromedriver/test/webview_shell:chromedriver_webview_shell_
apk", | 195 "//chrome/test/chromedriver/test/webview_shell:chromedriver_webview_shell_
apk", |
177 "//tools/imagediff($host_toolchain)", | 196 "//ui/android:ui_java", |
178 | |
179 # TODO(GYP): Remove these when the components_unittests work. | |
180 "//components/history/core/test:test", | |
181 "//components/policy:policy_component_test_support", | |
182 "//components/policy:test_support", | |
183 "//components/rappor:test_support", | |
184 "//components/signin/core/browser:test_support", | |
185 "//components/sync_driver:test_support", | |
186 "//components/user_manager", | |
187 "//components/wallpaper", | |
188 "//content/shell/android:content_shell_apk", | |
189 | |
190 # TODO(GYP): Are these needed, or will they be pulled in automatically? | |
191 "//third_party/android_tools:android_gcm_java", | 197 "//third_party/android_tools:android_gcm_java", |
192 "//third_party/android_tools:uiautomator_java", | 198 "//third_party/android_tools:uiautomator_java", |
193 "//third_party/android_tools:android_support_v13_java", | 199 "//third_party/android_tools:android_support_v13_java", |
194 "//third_party/android_tools:android_support_v7_appcompat_java", | 200 "//third_party/android_tools:android_support_v7_appcompat_java", |
195 "//third_party/android_tools:android_support_v7_mediarouter_java", | 201 "//third_party/android_tools:android_support_v7_mediarouter_java", |
196 "//third_party/mesa", | |
197 "//third_party/mockito:mockito_java", | 202 "//third_party/mockito:mockito_java", |
198 "//third_party/openmax_dl/dl", | |
199 "//third_party/speex", | |
200 "//ui/android:ui_java", | |
201 | |
202 # TODO(GYP): Are these needed? | |
203 "//chrome/test:test_support_unit", | |
204 "//third_party/smhasher:murmurhash3", | |
205 "//ui/message_center:test_support", | |
206 ] | |
207 deps -= [ | |
208 "//breakpad:symupload", # TODO(GYP) ?? | |
209 "//chrome", # TODO(GYP) ?? | |
210 "//chrome/test:browser_tests", # TODO(GYP) ?? | |
211 "//chrome/test:interactive_ui_tests", # TODO(GYP) ?? | |
212 "//chrome/test:sync_integration_tests", # TODO(GYP) ?? | |
213 "//chrome/test:unit_tests", # TODO(GYP) | |
214 "//extensions:extensions_browsertests", | |
215 "//extensions:extensions_unittests", | |
216 "//google_apis/gcm:gcm_unit_tests", | |
217 "//ipc:ipc_tests", # TODO(GYP) ?? | |
218 "//jingle:jingle_unittests", # TODO(GYP) ?? | |
219 "//net:net_unittests", | |
220 "//ppapi/examples", | |
221 "//third_party/pdfium/samples:pdfium_test", | |
222 "//tools/gn", | |
223 "//tools/gn:gn_unittests", | |
224 "//ui/app_list:app_list_unittests", | |
225 "//ui/views:views_unittests", | |
226 "//url:url_unittests", | |
227 ] | 203 ] |
228 | 204 |
229 if (has_chrome_android_internal) { | 205 if (has_chrome_android_internal) { |
230 deps += [ "//clank" ] # TODO(GYP) ?? | 206 deps += [ "//clank" ] |
231 } | 207 } |
232 } else if (is_linux) { | 208 |
| 209 # TODO(GYP): Move the targets in the rest of this block that still |
| 210 # need to be made to work in the GN build to the bottom of the file |
| 211 # so that all the remaining work is located in one place in the file. |
| 212 # This block should contain only the targets that aren't actually |
| 213 # needed on Android. |
| 214 |
| 215 deps -= [ |
| 216 "//apps", # Needs testing. |
| 217 "//chrome/browser", |
| 218 "//chrome/browser/devtools", |
| 219 "//chrome/common", |
| 220 "//chrome/plugin", |
| 221 "//chrome/renderer", |
| 222 "//chrome/test", |
| 223 "//chrome/tools", |
| 224 "//chrome/utility", |
| 225 "//content/shell:content_shell", |
| 226 "//extensions/browser", |
| 227 "//extensions/common", |
| 228 "//extensions/common/api", |
| 229 "//extensions/renderer", |
| 230 "//pdf", # Not compiled on Android in GYP yet, either. |
| 231 "//ppapi/examples", |
| 232 "//third_party/libusb", |
| 233 "//ui/keyboard", # Blocked on content. |
| 234 |
| 235 # Seems to not be compiled on Android. Otherwise it will need a config.h. |
| 236 "//third_party/libxslt", |
| 237 |
| 238 # Not relevant to Android. |
| 239 "//ash", |
| 240 "//tools/gn", |
| 241 "//ui/aura", |
| 242 "//ui/display", |
| 243 "//ui/views", |
| 244 "//ui/views/controls/webview", |
| 245 |
| 246 # Fails on Android for unknown reasons. |
| 247 "//third_party/flac", |
| 248 "//breakpad:symupload", |
| 249 |
| 250 # Not tested on Android yet: |
| 251 "//google_apis/gcm", |
| 252 "//remoting/client/plugin", |
| 253 "//storage/browser", |
| 254 "//third_party/cld_2", |
| 255 "//third_party/ffmpeg", |
| 256 "//ui/app_list", |
| 257 "//ui/web_dialogs", |
| 258 ] |
| 259 } |
| 260 |
| 261 if (use_ozone) { |
233 deps += [ | 262 deps += [ |
234 "//dbus:dbus_unittests", | 263 "//ui/ozone", |
235 "//sandbox/linux:sandbox_linux_unittests", | 264 "//ui/ozone/demo", |
236 ] | 265 ] |
237 } else if (is_mac) { | 266 } |
| 267 |
| 268 # Non-mobile builds. |
| 269 if (!is_android && !is_ios) { |
| 270 deps += [ |
| 271 "//device/usb", |
| 272 "//device:device_unittests", |
| 273 "//third_party/pdfium/samples", |
| 274 ] |
| 275 } |
| 276 |
| 277 # |
| 278 # TODO(GYP): Make everything below this work in the GN build. |
| 279 # |
| 280 |
| 281 if (is_mac) { |
238 deps += [ | 282 deps += [ |
239 "//third_party/apple_sample_code", | 283 "//third_party/apple_sample_code", |
240 "//third_party/molokocacao", | 284 "//third_party/molokocacao", |
241 ] | 285 ] |
242 | 286 |
243 # TODO(GYP): Remove these when the targets below work and these | |
244 # are pulled in automatically. | |
245 deps += [ | |
246 "//cc/blink", | |
247 "//components/ui/zoom:ui_zoom", | |
248 "//content", | |
249 "//content/test:test_support", | |
250 "//device/battery", | |
251 "//device/bluetooth", | |
252 "//device/nfc", | |
253 "//device/usb", | |
254 "//device/vibration", | |
255 "//media/blink", | |
256 "//pdf", | |
257 "//storage/browser", | |
258 "//third_party/brotli", | |
259 "//third_party/flac", | |
260 "//third_party/hunspell", | |
261 "//third_party/iccjpeg", | |
262 "//third_party/libphonenumber", | |
263 "//third_party/ots", | |
264 "//third_party/qcms", | |
265 "//third_party/smhasher:murmurhash3", | |
266 "//third_party/speex", | |
267 "//third_party/webrtc/system_wrappers", | |
268 "//ui/native_theme", | |
269 "//ui/snapshot", | |
270 "//ui/surface", | |
271 ] | |
272 | |
273 # TODO(dpranke): These are as-yet untriaged but need at least the above. | 287 # TODO(dpranke): These are as-yet untriaged but need at least the above. |
274 deps -= [ | 288 deps -= [ |
275 "//chrome", # TODO(GYP) | 289 "//apps", |
276 "//chrome/test:browser_tests", # TODO(GYP) | 290 "//ash", |
277 "//chrome/test:interactive_ui_tests", # TODO(GYP) | 291 "//chrome/browser", |
278 "//chrome/test:sync_integration_tests", # TODO(GYP) | 292 "//chrome/browser/devtools", |
279 "//chrome/test:unit_tests", # TODO(GYP) | 293 "//chrome/common", |
280 "//components:components_unittests", # TODO(GYP) | 294 "//chrome/plugin", |
281 "//content/test:content_browsertests", # TODO(GYP) | 295 "//chrome/renderer", |
282 "//content/test:content_perftests", # TODO(GYP) | 296 "//chrome/test", |
283 "//content/test:content_unittests", # TODO(GYP) | 297 "//chrome/utility", |
284 "//extensions:extensions_browsertests", # TODO(GYP) | 298 "//components:all_components", |
285 "//extensions:extensions_unittests", # TODO(GYP) | 299 "//content/shell:content_shell", |
286 "//net:net_unittests", # TODO(GYP) | 300 "//extensions/browser", |
287 "//third_party/usrsctp", # TODO(GYP) | 301 "//extensions/common", |
288 "//ui/app_list:app_list_unittests", # TODO(GYP) | 302 "//extensions/common/api", |
289 "//ui/gfx:gfx_unittests", # TODO(GYP) | 303 "//extensions/renderer", |
290 "//ui/views:views_unittests", # TODO(GYP) | 304 "//remoting/client/plugin", |
291 ] | 305 "//third_party/usrsctp", |
292 } else if (is_win) { | 306 "//ui/app_list", |
293 deps += [ "//ui/metro_viewer" ] | 307 "//ui/aura", |
294 deps -= [ | 308 "//ui/keyboard", |
295 "//crypto:crypto_unittests", # TODO(GYP) | 309 "//ui/views", |
296 "//net:net_unittests", # TODO(GYP) | 310 "//ui/views/controls/webview", |
| 311 "//ui/web_dialogs", |
297 ] | 312 ] |
298 } | 313 } |
| 314 |
| 315 if (is_mac || is_ios) { |
| 316 deps -= [ "//ui/touch_selection" ] |
| 317 } |
299 } | 318 } |
OLD | NEW |