Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(175)

Side by Side Diff: mojo/dart/embedder/BUILD.gn

Issue 1346773002: Stop running pub get at gclient sync time and fix build bugs (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 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 # embedder specific template rules. 5 # embedder specific template rules.
6 import("embedder.gni") 6 import("embedder.gni")
7 7
8 source_set("dart_controller_no_snapshot") { 8 source_set("dart_controller_no_snapshot") {
9 sources = [ 9 sources = [
10 "$target_gen_dir/dart_embedder_patch_resources.cc", 10 "$target_gen_dir/dart_embedder_patch_resources.cc",
(...skipping 22 matching lines...) Expand all
33 if (is_android) { 33 if (is_android) {
34 sources += [ "io/internet_address_android.cc" ] 34 sources += [ "io/internet_address_android.cc" ]
35 } 35 }
36 36
37 deps = [ 37 deps = [
38 ":dart_embedder_packages", 38 ":dart_embedder_packages",
39 ":generate_dart_embedder_patch_resources_cc", 39 ":generate_dart_embedder_patch_resources_cc",
40 ":generate_dart_embedder_service_isolate_resources_cc", 40 ":generate_dart_embedder_service_isolate_resources_cc",
41 "//base", 41 "//base",
42 "//base:i18n", 42 "//base:i18n",
43 "//dart/runtime:libdart", 43 "//mojo/public/third_party/dart/runtime:libdart",
44 "//dart/runtime/bin:libdart_embedder_noio", 44 "//mojo/public/third_party/dart/runtime/bin:libdart_embedder_noio",
45 "//third_party/dart-pkg", 45 "//mojo/public/third_party/dart-pkg",
46 "//mojo/message_pump", 46 "//mojo/message_pump",
47 "//mojo/public/c/system", 47 "//mojo/public/c/system",
48 "//mojo/public/cpp/system", 48 "//mojo/public/cpp/system",
49 "//mojo/services/network/public/interfaces", 49 "//mojo/services/network/public/interfaces",
50 "//tonic", 50 "//tonic",
51 ] 51 ]
52 52
53 defines = [] 53 defines = []
54 if (is_debug) { 54 if (is_debug) {
55 defines += [ "DEBUG" ] 55 defines += [ "DEBUG" ]
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 "//mojo/dart/embedder/vmservice/main.dart", 151 "//mojo/dart/embedder/vmservice/main.dart",
152 "//mojo/dart/embedder/vmservice/resources.dart", 152 "//mojo/dart/embedder/vmservice/resources.dart",
153 "//mojo/dart/embedder/vmservice/server.dart", 153 "//mojo/dart/embedder/vmservice/server.dart",
154 ] 154 ]
155 root_prefix = "//mojo/dart/embedder/" 155 root_prefix = "//mojo/dart/embedder/"
156 input_directory = "$root_out_dir/observatory/deployed/web/" 156 input_directory = "$root_out_dir/observatory/deployed/web/"
157 output = "$target_gen_dir/dart_embedder_service_isolate_resources.cc" 157 output = "$target_gen_dir/dart_embedder_service_isolate_resources.cc"
158 table_name = "dart_embedder_service_isolate" 158 table_name = "dart_embedder_service_isolate"
159 } 159 }
160 160
161 observatory_sources_gypi = 161 observatory_sources_gypi = exec_script(
162 exec_script("../../../dart/tools/gypi_to_gn.py", 162 "../../public/third_party/dart/tools/gypi_to_gn.py",
163 [ rebase_path( 163 [ rebase_path(
164 "//dart/runtime/observatory/observatory_sources.gypi") ], 164 "//mojo/public/third_party/dart/runtime/observatory/observatory_sour ces.gypi") ],
165 "scope", 165 "scope",
166 [ "//dart/runtime/observatory/observatory_sources.gypi" ]) 166 [ "//mojo/public/third_party/dart/runtime/observatory/observatory_source s.gypi" ])
167 167
168 copy("copy_observatory") { 168 copy("copy_observatory") {
169 sources = rebase_path(observatory_sources_gypi.sources, 169 sources = rebase_path(observatory_sources_gypi.sources,
170 "", 170 "",
171 "../../../dart/runtime/observatory") 171 "../../public/third_party/dart/runtime/observatory")
172 outputs = [ 172 outputs = [
173 "$root_gen_dir/observatory_copy/{{source_root_relative_dir}}/{{source_file_p art}}", 173 "$root_gen_dir/observatory_copy/{{source_root_relative_dir}}/{{source_file_p art}}",
174 ] 174 ]
175 } 175 }
176 176
177 action("write_observatory_pubspec_yaml") { 177 action("write_observatory_pubspec_yaml") {
178 deps = [ 178 deps = [
179 ":copy_observatory", 179 ":copy_observatory",
180 ] 180 ]
181 181
182 script = "//dart/tools/observatory_tool.py" 182 script = "//mojo/public/third_party/dart/tools/observatory_tool.py"
183 183
184 inputs = [ 184 inputs = [
185 rebase_path("//dart/runtime/observatory/pubspec.yaml"), 185 rebase_path(
186 "//mojo/public/third_party/dart/runtime/observatory/pubspec.yaml"),
186 ] 187 ]
187 188
188 args = [ 189 args = [
189 "--silent=True", 190 "--silent=True",
190 "--pub-executable", 191 "--pub-executable",
191 rebase_path("//third_party/dart-sdk/dart-sdk/bin/pub"), 192 rebase_path("//third_party/dart-sdk/dart-sdk/bin/pub"),
192 "--directory", 193 "--directory",
193 rebase_path("$root_gen_dir/observatory_copy/dart/runtime/observatory/"), 194 rebase_path(
195 "$root_gen_dir/observatory_copy/mojo/public/third_party/dart/runtime/obs ervatory/"),
194 "--command", 196 "--command",
195 "rewrite", 197 "rewrite",
196 rebase_path("//dart/runtime/observatory/pubspec.yaml"),
197 rebase_path( 198 rebase_path(
198 "$root_gen_dir/observatory_copy/dart/runtime/observatory/pubspec.yaml"), 199 "//mojo/public/third_party/dart/runtime/observatory/pubspec.yaml"),
200 rebase_path(
201 "$root_gen_dir/observatory_copy/mojo/public/third_party/dart/runtime/obs ervatory/pubspec.yaml"),
199 "../../third_party/", 202 "../../third_party/",
200 rebase_path("../../../dart/third_party/"), 203 rebase_path("../../public/third_party/dart/third_party/"),
201 ] 204 ]
202 205
203 outputs = [ 206 outputs = [
204 "$root_gen_dir/observatory_copy/dart/runtime/observatory/pubspec.yaml", 207 "$root_gen_dir/observatory_copy/mojo/public/third_party/dart/runtime/observa tory/pubspec.yaml",
205 ] 208 ]
206 } 209 }
207 210
208 action("copy_observatory_deps") { 211 action("copy_observatory_deps") {
209 deps = [ 212 deps = [
210 ":write_observatory_pubspec_yaml", 213 ":write_observatory_pubspec_yaml",
211 ] 214 ]
212 215
213 script = "//dart/tools/observatory_tool.py" 216 script = "//mojo/public/third_party/dart/tools/observatory_tool.py"
214 217
215 inputs = [ 218 inputs = [
216 script, 219 script,
217 "$root_gen_dir/observatory_copy/dart/runtime/observatory/pubspec.yaml", 220 "$root_gen_dir/observatory_copy/mojo/public/third_party/dart/runtime/observa tory/pubspec.yaml",
218 ] 221 ]
219 222
220 args = [ 223 args = [
221 "--silent=True", 224 "--silent=True",
222 "--pub-executable", 225 "--pub-executable",
223 rebase_path("//third_party/dart-sdk/dart-sdk/bin/pub"), 226 rebase_path("//third_party/dart-sdk/dart-sdk/bin/pub"),
224 "--directory", 227 "--directory",
225 rebase_path("$root_gen_dir/observatory_copy/dart/runtime/observatory/"), 228 rebase_path(
229 "$root_gen_dir/observatory_copy/mojo/public/third_party/dart/runtime/obs ervatory/"),
226 "--command", 230 "--command",
227 "get", 231 "get",
228 ] 232 ]
229 233
230 outputs = [ 234 outputs = [
231 "$root_gen_dir/observatory_copy/dart/runtime/observatory/pubspec.lock", 235 "$root_gen_dir/observatory_copy/mojo/public/third_party/dart/runtime/observa tory/pubspec.lock",
232 ] 236 ]
233 } 237 }
234 238
235 action("pub_build_observatory") { 239 action("pub_build_observatory") {
236 sources = 240 sources = rebase_path(
237 rebase_path(observatory_sources_gypi.sources, 241 observatory_sources_gypi.sources,
238 "", 242 "",
239 "$root_gen_dir/observatory_copy/dart/runtime/observatory") 243 "$root_gen_dir/observatory_copy/mojo/public/third_party/dart/runtime/o bservatory")
240 244
241 deps = [ 245 deps = [
242 ":copy_observatory", 246 ":copy_observatory",
243 ":copy_observatory_deps", 247 ":copy_observatory_deps",
244 ] 248 ]
245 249
246 script = "//dart/tools/observatory_tool.py" 250 script = "//mojo/public/third_party/dart/tools/observatory_tool.py"
247 251
248 inputs = [ 252 inputs = [
249 script, 253 script,
250 ] 254 ]
251 inputs += sources 255 inputs += sources
252 256
253 args = [ 257 args = [
254 "--silent=True", 258 "--silent=True",
255 "--pub-executable", 259 "--pub-executable",
256 rebase_path("//third_party/dart-sdk/dart-sdk/bin/pub"), 260 rebase_path("//third_party/dart-sdk/dart-sdk/bin/pub"),
257 "--directory", 261 "--directory",
258 rebase_path("$root_gen_dir/observatory_copy/dart/runtime/observatory/"), 262 rebase_path(
263 "$root_gen_dir/observatory_copy/mojo/public/third_party/dart/runtime/obs ervatory/"),
259 "--command", 264 "--command",
260 "build", 265 "build",
261 rebase_path("$root_out_dir/observatory/build"), 266 rebase_path("$root_out_dir/observatory/build"),
262 ] 267 ]
263 268
264 outputs = [ 269 outputs = [
265 "$root_out_dir/observatory/build/web/index.html", 270 "$root_out_dir/observatory/build/web/index.html",
266 "$root_out_dir/observatory/build/web/index.html.polymer.bootstrap.dart.js", 271 "$root_out_dir/observatory/build/web/index.html.polymer.bootstrap.dart.js",
267 ] 272 ]
268 } 273 }
269 274
270 action("deploy_observatory") { 275 action("deploy_observatory") {
271 deps = [ 276 deps = [
272 ":pub_build_observatory", 277 ":pub_build_observatory",
273 ] 278 ]
274 279
275 script = "//dart/tools/observatory_tool.py" 280 script = "//mojo/public/third_party/dart/tools/observatory_tool.py"
276 281
277 inputs = [ 282 inputs = [
278 script, 283 script,
279 "$root_out_dir/observatory/build/web/index.html", 284 "$root_out_dir/observatory/build/web/index.html",
280 "$root_out_dir/observatory/build/web/index.html.polymer.bootstrap.dart.js", 285 "$root_out_dir/observatory/build/web/index.html.polymer.bootstrap.dart.js",
281 ] 286 ]
282 287
283 args = [ 288 args = [
284 "--silent=True", 289 "--silent=True",
285 "--pub-executable", 290 "--pub-executable",
286 rebase_path("//third_party/dart-sdk/dart-sdk/bin/pub"), 291 rebase_path("//third_party/dart-sdk/dart-sdk/bin/pub"),
287 "--directory", 292 "--directory",
288 rebase_path("$root_out_dir/observatory"), 293 rebase_path("$root_out_dir/observatory"),
289 "--command", 294 "--command",
290 "deploy", 295 "deploy",
291 ] 296 ]
292 297
293 outputs = [ 298 outputs = [
294 "$root_out_dir/observatory/deployed/web/index.html", 299 "$root_out_dir/observatory/deployed/web/index.html",
295 "$root_out_dir/observatory/deployed/web/index.html.polymer.bootstrap.dart.js ", 300 "$root_out_dir/observatory/deployed/web/index.html.polymer.bootstrap.dart.js ",
296 ] 301 ]
297 } 302 }
298 303
299 action("generate_snapshot_bin") { 304 action("generate_snapshot_bin") {
300 deps = [ 305 deps = [
301 "//dart/runtime/bin:gen_snapshot($host_toolchain)", 306 "//mojo/public/third_party/dart/runtime/bin:gen_snapshot($host_toolchain)",
302 ":dart_embedder_packages", 307 ":dart_embedder_packages",
303 ] 308 ]
304 inputs = [ 309 inputs = [
305 "snapshot.dart", 310 "snapshot.dart",
306 "//dart/runtime/tools/create_snapshot_bin.py", 311 "//mojo/public/third_party/dart/runtime/tools/create_snapshot_bin.py",
307 "//mojo/dart/embedder/builtin.dart", 312 "//mojo/dart/embedder/builtin.dart",
308 "//mojo/dart/embedder/packages.dart", 313 "//mojo/dart/embedder/packages.dart",
309 "//mojo/public/dart/mojo/sdk_ext/internal.dart", 314 "//mojo/public/dart/mojo/sdk_ext/internal.dart",
310 "//mojo/public/dart/mojo/sdk_ext/src/handle_watcher.dart", 315 "//mojo/public/dart/mojo/sdk_ext/src/handle_watcher.dart",
311 "//mojo/public/dart/mojo/sdk_ext/src/natives.dart", 316 "//mojo/public/dart/mojo/sdk_ext/src/natives.dart",
312 "//mojo/public/dart/mojo/sdk_ext/src/timer_queue.dart", 317 "//mojo/public/dart/mojo/sdk_ext/src/timer_queue.dart",
313 ] 318 ]
314 vm_isolate_snapshot = "$target_gen_dir/vm_isolate_snapshot.bin" 319 vm_isolate_snapshot = "$target_gen_dir/vm_isolate_snapshot.bin"
315 isolate_snapshot = "$target_gen_dir/isolate_snapshot.bin" 320 isolate_snapshot = "$target_gen_dir/isolate_snapshot.bin"
316 outputs = [ 321 outputs = [
317 vm_isolate_snapshot, 322 vm_isolate_snapshot,
318 isolate_snapshot, 323 isolate_snapshot,
319 ] 324 ]
320 325
321 gen_snapshot_dir = 326 gen_snapshot_dir =
322 get_label_info("//dart/runtime/bin:gen_snapshot($host_toolchain)", 327 get_label_info("//dart/runtime/bin:gen_snapshot($host_toolchain)",
323 "root_out_dir") 328 "root_out_dir")
324 script = "//dart/runtime/tools/create_snapshot_bin.py" 329 script = "//mojo/public/third_party/dart/runtime/tools/create_snapshot_bin.py"
325 builtin_path = rebase_path("//mojo/dart/embedder/builtin.dart") 330 builtin_path = rebase_path("//mojo/dart/embedder/builtin.dart")
326 internal_path = rebase_path("//mojo/public/dart/mojo/sdk_ext/internal.dart") 331 internal_path = rebase_path("//mojo/public/dart/mojo/sdk_ext/internal.dart")
327 io_path = rebase_path("//dart/sdk/lib/io/io.dart") 332 io_path = rebase_path("//mojo/public/third_party/dart/sdk/lib/io/io.dart")
328 333
329 embedder_packages_path = rebase_path("//mojo/dart/embedder/packages.dart") 334 embedder_packages_path = rebase_path("//mojo/dart/embedder/packages.dart")
330 embedder_package_application_path = rebase_path( 335 embedder_package_application_path = rebase_path(
331 "$root_gen_dir/dart_embedder_packages/mojo/public/dart/mojo/lib/applic ation.dart") 336 "$root_gen_dir/dart_embedder_packages/mojo/public/dart/mojo/lib/applic ation.dart")
332 embedder_package_bindings_path = rebase_path( 337 embedder_package_bindings_path = rebase_path(
333 "$root_gen_dir/dart_embedder_packages/mojo/public/dart/mojo/lib/bindin gs.dart") 338 "$root_gen_dir/dart_embedder_packages/mojo/public/dart/mojo/lib/bindin gs.dart")
334 embedder_package_core_path = rebase_path( 339 embedder_package_core_path = rebase_path(
335 "$root_gen_dir/dart_embedder_packages/mojo/public/dart/mojo/lib/core.d art") 340 "$root_gen_dir/dart_embedder_packages/mojo/public/dart/mojo/lib/core.d art")
336 url_mappings_script = 341 url_mappings_script =
337 rebase_path("//mojo/dart/embedder/tools/dart_embedder_url_mappings.py") 342 rebase_path("//mojo/dart/embedder/tools/dart_embedder_url_mappings.py")
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
381 "--url_mapping=dart:_mojo/bindings.dart,$embedder_package_bindings_pa th", 386 "--url_mapping=dart:_mojo/bindings.dart,$embedder_package_bindings_pa th",
382 "--url_mapping=dart:_mojo/core.dart,$embedder_package_core_path", 387 "--url_mapping=dart:_mojo/core.dart,$embedder_package_core_path",
383 ] + embedder_mojom_url_mappings 388 ] + embedder_mojom_url_mappings
384 } 389 }
385 390
386 action("generate_snapshot_file") { 391 action("generate_snapshot_file") {
387 deps = [ 392 deps = [
388 ":generate_snapshot_bin", 393 ":generate_snapshot_bin",
389 ] 394 ]
390 inputs = [ 395 inputs = [
391 "//dart/runtime/tools/create_snapshot_file.py", 396 "//mojo/public/third_party/dart/runtime/tools/create_snapshot_file.py",
392 "//mojo/dart/embedder/snapshot.cc.tmpl", 397 "//mojo/dart/embedder/snapshot.cc.tmpl",
393 "$target_gen_dir/vm_isolate_snapshot.bin", 398 "$target_gen_dir/vm_isolate_snapshot.bin",
394 "$target_gen_dir/isolate_snapshot.bin", 399 "$target_gen_dir/isolate_snapshot.bin",
395 ] 400 ]
396 output = "$root_gen_dir/dart_snapshot.cc" 401 output = "$root_gen_dir/dart_snapshot.cc"
397 outputs = [ 402 outputs = [
398 output, 403 output,
399 ] 404 ]
400 405
401 script = "//dart/runtime/tools/create_snapshot_file.py" 406 script =
407 "//mojo/public/third_party/dart/runtime/tools/create_snapshot_file.py"
402 args = [ 408 args = [
403 "--vm_input_bin", 409 "--vm_input_bin",
404 rebase_path("$target_gen_dir/vm_isolate_snapshot.bin"), 410 rebase_path("$target_gen_dir/vm_isolate_snapshot.bin"),
405 "--input_bin", 411 "--input_bin",
406 rebase_path("$target_gen_dir/isolate_snapshot.bin"), 412 rebase_path("$target_gen_dir/isolate_snapshot.bin"),
407 "--input_cc", 413 "--input_cc",
408 rebase_path("//mojo/dart/embedder/snapshot.cc.tmpl"), 414 rebase_path("//mojo/dart/embedder/snapshot.cc.tmpl"),
409 "--output", 415 "--output",
410 rebase_path(output), 416 rebase_path(output),
411 ] 417 ]
412 } 418 }
413 419
414 source_set("dart_snapshot_cc") { 420 source_set("dart_snapshot_cc") {
415 sources = [ 421 sources = [
416 "$root_gen_dir/dart_snapshot.cc", 422 "$root_gen_dir/dart_snapshot.cc",
417 ] 423 ]
418 424
419 deps = [ 425 deps = [
420 ":generate_snapshot_file", 426 ":generate_snapshot_file",
421 ] 427 ]
422 } 428 }
OLDNEW
« DEPS ('K') | « mojo/dart/dart_snapshotter/vm.h ('k') | mojo/dart/embedder/builtin.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698