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

Side by Side Diff: runtime/bin/BUILD.gn

Issue 2351743004: Added a target for a host version of the dart executable. (Closed) Base URL: https://chromium.googlesource.com/external/github.com/dart-lang/sdk/@master
Patch Set: Fixed third_party paths. Created 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 # Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 # for details. All rights reserved. Use of this source code is governed by a 2 # for details. All rights reserved. Use of this source code is governed by a
3 # BSD-style license that can be found in the LICENSE file. 3 # BSD-style license that can be found in the LICENSE file.
4 4
5 5
6 declare_args() { 6 declare_args() {
7 dart_third_party_base = "//dart/third_party"
8
7 dart_io_support = false 9 dart_io_support = false
8 10
9 # TODO(zra, jamesr): Remove this check once we start building boringssl for 11 dart_no_fallback_root_certificates = false
10 # the fuchsia port.
11 if (!defined(is_fuchsia) || !is_fuchsia) {
12 dart_boringssl_path = "../../third_party/boringssl"
13 }
14 } 12 }
15 13
16 14
17 resources_sources_gypi = 15 resources_sources_gypi =
18 exec_script("../../tools/gypi_to_gn.py", 16 exec_script("../../tools/gypi_to_gn.py",
19 [rebase_path("vmservice/vmservice_sources.gypi")], 17 [rebase_path("vmservice/vmservice_sources.gypi")],
20 "scope", 18 "scope",
21 ["vmservice/vmservice_sources.gypi"]) 19 ["vmservice/vmservice_sources.gypi"])
22 20
23 # Generate a resources.cc file for the service isolate without Observatory. 21 # Generate a resources.cc file for the service isolate without Observatory.
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 } 261 }
264 262
265 # A source set for the implementation of 'dart:io' library 263 # A source set for the implementation of 'dart:io' library
266 # (without secure sockets) suitable for linking with gen_snapshot. 264 # (without secure sockets) suitable for linking with gen_snapshot.
267 source_set("gen_snapshot_dart_io") { 265 source_set("gen_snapshot_dart_io") {
268 configs += ["..:dart_config", 266 configs += ["..:dart_config",
269 "..:dart_product_config", 267 "..:dart_product_config",
270 "..:dart_precompiler_config"] 268 "..:dart_precompiler_config"]
271 269
272 deps = [ 270 deps = [
273 "//third_party/zlib", 271 dart_third_party_base + "/zlib",
zra 2016/09/19 21:14:27 As it turns out, in the Flutter engine build, zlib
P.Y.L. 2016/09/19 21:16:47 LOL. How about I leave zlib alone for now and we a
274 ] 272 ]
275 273
276 custom_sources_filter = [ 274 custom_sources_filter = [
277 "*_test.cc", 275 "*_test.cc",
278 "*_test.h", 276 "*_test.h",
279 "builtin.cc", 277 "builtin.cc",
280 "builtin_common.cc", 278 "builtin_common.cc",
281 "builtin_gen_snapshot.cc", 279 "builtin_gen_snapshot.cc",
282 ] 280 ]
283 if (!is_mac && !is_ios) { 281 if (!is_mac && !is_ios) {
284 # Dart tree uses *_macos.* instead of *_mac.* 282 # Dart tree uses *_macos.* instead of *_mac.*
285 custom_sources_filter += [ 283 custom_sources_filter += [
286 "*_macos.h", 284 "*_macos.h",
287 "*_macos.cc", 285 "*_macos.cc",
288 ] 286 ]
289 } 287 }
290 set_sources_assignment_filter(custom_sources_filter) 288 set_sources_assignment_filter(custom_sources_filter)
291 289
292 defines = [ "DART_IO_SECURE_SOCKET_DISABLED" ] 290 defines = [ "DART_IO_SECURE_SOCKET_DISABLED" ]
293 291
294 sources = io_impl_sources_gypi.sources + builtin_impl_sources_gypi.sources 292 sources = io_impl_sources_gypi.sources + builtin_impl_sources_gypi.sources
295 sources += [ 293 sources += [
296 "io_natives.cc", 294 "io_natives.cc",
297 "io_natives.h", 295 "io_natives.h",
298 ] 296 ]
299 297
300 include_dirs = [ 298 include_dirs = [
301 "..", 299 "..",
302 "//third_party" 300 dart_third_party_base,
303 ] 301 ]
304 } 302 }
305 303
306 source_set("libdart_embedder_noio") { 304 source_set("libdart_embedder_noio") {
307 configs += ["..:dart_config", 305 configs += ["..:dart_config",
308 "..:dart_product_config", 306 "..:dart_product_config",
309 "..:dart_precompiled_runtime_config"] 307 "..:dart_precompiled_runtime_config"]
310 deps = [ 308 deps = [
311 "..:libdart", 309 "..:libdart",
312 "../vm:libdart_platform", 310 "../vm:libdart_platform",
(...skipping 18 matching lines...) Expand all
331 # Dart tree uses *_macos.* instead of *_mac.* 329 # Dart tree uses *_macos.* instead of *_mac.*
332 custom_sources_filter += [ 330 custom_sources_filter += [
333 "*_macos.h", 331 "*_macos.h",
334 "*_macos.cc", 332 "*_macos.cc",
335 ] 333 ]
336 } 334 }
337 set_sources_assignment_filter(custom_sources_filter) 335 set_sources_assignment_filter(custom_sources_filter)
338 336
339 if (is_mac || is_ios) { 337 if (is_mac || is_ios) {
340 libs = [ 338 libs = [
339 "CoreFoundation.framework",
340 "CoreServices.framework",
341 "Security.framework", 341 "Security.framework",
342 ] 342 ]
343 } else if (defined(is_fuchsia) && is_fuchsia) { 343 } else if (defined(is_fuchsia) && is_fuchsia) {
344 defines = [ 344 defines = [
345 "DART_IO_SECURE_SOCKET_DISABLED" 345 "DART_IO_SECURE_SOCKET_DISABLED"
346 ] 346 ]
347 } else { 347 } else {
348 deps = [ 348 deps = [
349 rebase_path(dart_boringssl_path, "."), 349 rebase_path(dart_third_party_base + "/boringssl", "."),
350 ] 350 ]
351 if (is_linux && dart_no_fallback_root_certificates) {
352 defines = [
353 "DART_IO_ROOT_CERTS_DISABLED"
354 ]
355 }
351 } 356 }
352 357
353 sources = io_impl_sources_gypi.sources + builtin_impl_sources_gypi.sources 358 sources = io_impl_sources_gypi.sources + builtin_impl_sources_gypi.sources
354 sources += [ 359 sources += [
355 "builtin_nolib.cc", 360 "builtin_nolib.cc",
356 "builtin_natives.cc", 361 "builtin_natives.cc",
357 "io_natives.cc", 362 "io_natives.cc",
358 "io_natives.h", 363 "io_natives.h",
359 "embedded_dart_io.cc", 364 "embedded_dart_io.cc",
360 "embedded_dart_io.h", 365 "embedded_dart_io.h",
361 "log_android.cc", 366 "log_android.cc",
362 "log_linux.cc", 367 "log_linux.cc",
363 "log_macos.cc", 368 "log_macos.cc",
364 "log_win.cc", 369 "log_win.cc",
365 "log.h", 370 "log.h",
366 ] 371 ]
367 if (is_linux) { 372
368 sources += [ "../../third_party/root_certificates/root_certificates.cc"] 373 if (is_linux && !dart_no_fallback_root_certificates) {
374 sources += [ dart_third_party_base + "/root_certificates/root_certificates.c c"]
369 } 375 }
370 376
371 include_dirs = [ 377 include_dirs = [
372 "..", 378 "..",
373 "//third_party" 379 dart_third_party_base,
374 ] 380 ]
375 } 381 }
376 382
377 383
378 action("generate_snapshot_bin") { 384 action("generate_snapshot_bin") {
379 deps = [ 385 deps = [
380 "../bin:gen_snapshot($host_toolchain)", 386 "../bin:gen_snapshot($host_toolchain)",
381 ] 387 ]
382 388
383 vm_isolate_snapshot = "$target_gen_dir/vm_isolate_snapshot.bin" 389 vm_isolate_snapshot = "$target_gen_dir/vm_isolate_snapshot.bin"
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
447 deps = [ 453 deps = [
448 ":generate_snapshot_file", 454 ":generate_snapshot_file",
449 ] 455 ]
450 } 456 }
451 457
452 if (defined(is_fuchsia) && is_fuchsia) { 458 if (defined(is_fuchsia) && is_fuchsia) {
453 copy("hello_fuchsia") { 459 copy("hello_fuchsia") {
454 sources = [ "../tests/vm/dart/hello_fuchsia_test.dart" ] 460 sources = [ "../tests/vm/dart/hello_fuchsia_test.dart" ]
455 outputs = [ "$root_out_dir/hello_fuchsia.dart" ] 461 outputs = [ "$root_out_dir/hello_fuchsia.dart" ]
456 } 462 }
463 }
457 464
458 executable("dart_no_observatory") { 465 executable("dart_no_observatory") {
459 configs += ["..:dart_config", 466 configs += ["..:dart_config",
460 "..:dart_product_config", 467 "..:dart_product_config",
461 "..:dart_precompiled_runtime_config",] 468 "..:dart_precompiled_runtime_config",]
462 deps = [ 469 deps = [
470 ":gen_resources_cc",
471 ":embedded_dart_io",
472 ":libdart_builtin",
473 "../vm:libdart_platform",
474 "..:libdart",
475 ":dart_snapshot_cc",
476 "../../pkg:pkg", # Pull this out to top-level for a real SDK build.
477 dart_third_party_base + "/zlib",
478 ]
479
480 if (defined(is_fuchsia) && is_fuchsia) {
481 deps += [
463 ":hello_fuchsia", 482 ":hello_fuchsia",
464 ":gen_resources_cc",
465 ":embedded_dart_io",
466 ":libdart_builtin",
467 "../vm:libdart_platform",
468 "..:libdart",
469 ":dart_snapshot_cc",
470 "../../pkg:pkg", # Pull this out to top-level for a real SDK build.
471 "//third_party/zlib",
472 ]
473
474 defines = [
475 "NO_OBSERVATORY",
476 ]
477
478 sources = [
479 "main.cc",
480 "observatory_assets_empty.cc",
481 "vmservice_impl.cc",
482 "vmservice_impl.h",
483 "$target_gen_dir/resources_gen.cc",
484 ]
485
486 include_dirs = [
487 "..",
488 "//third_party",
489 ] 483 ]
490 } 484 }
491 485
486 defines = [
487 "NO_OBSERVATORY",
488 ]
489
490 sources = [
491 "main.cc",
492 "observatory_assets_empty.cc",
493 "vmservice_impl.cc",
494 "vmservice_impl.h",
495 "$target_gen_dir/resources_gen.cc",
496 ]
497
498 include_dirs = [
499 "..",
500 dart_third_party_base,
501 ]
502 }
503
504
505 if (defined(is_fuchsia) && is_fuchsia) {
492 action("generate_snapshot_test_dat_file") { 506 action("generate_snapshot_test_dat_file") {
493 snapshot_test_dat_file = "$root_gen_dir/snapshot_test.dat" 507 snapshot_test_dat_file = "$root_gen_dir/snapshot_test.dat"
494 snapshot_test_in_dat_file = "../vm/snapshot_test_in.dat" 508 snapshot_test_in_dat_file = "../vm/snapshot_test_in.dat"
495 snapshot_test_dart_file = "../vm/snapshot_test.dart" 509 snapshot_test_dart_file = "../vm/snapshot_test.dart"
496 inputs = [ 510 inputs = [
497 "../tools/create_string_literal.py", 511 "../tools/create_string_literal.py",
498 snapshot_test_in_dat_file, 512 snapshot_test_in_dat_file,
499 snapshot_test_dart_file, 513 snapshot_test_dart_file,
500 ] 514 ]
501 515
(...skipping 20 matching lines...) Expand all
522 configs += ["..:dart_config", 536 configs += ["..:dart_config",
523 "..:dart_product_config", 537 "..:dart_product_config",
524 "..:dart_precompiled_runtime_config",] 538 "..:dart_precompiled_runtime_config",]
525 deps = [ 539 deps = [
526 "..:libdart", 540 "..:libdart",
527 ":libdart_builtin", 541 ":libdart_builtin",
528 ":embedded_dart_io", 542 ":embedded_dart_io",
529 ":dart_snapshot_cc", 543 ":dart_snapshot_cc",
530 ":generate_snapshot_test_dat_file", 544 ":generate_snapshot_test_dat_file",
531 "../vm:libdart_platform", 545 "../vm:libdart_platform",
532 "//third_party/zlib", 546 dart_third_party_base + "/zlib",
533 ] 547 ]
534 include_dirs = [ 548 include_dirs = [
535 "..", 549 "..",
536 "$target_gen_dir", 550 "$target_gen_dir",
537 ] 551 ]
538 defines = [ 552 defines = [
539 "TESTING", 553 "TESTING",
540 ] 554 ]
541 555
542 vm_tests_list = exec_script("../../tools/gypi_to_gn.py", 556 vm_tests_list = exec_script("../../tools/gypi_to_gn.py",
(...skipping 23 matching lines...) Expand all
566 sources = [ 580 sources = [
567 "run_vm_tests_fuchsia.cc" 581 "run_vm_tests_fuchsia.cc"
568 ] 582 ]
569 libs = [ 583 libs = [
570 "launchpad", 584 "launchpad",
571 "magenta", 585 "magenta",
572 "runtime", 586 "runtime",
573 ] 587 ]
574 } 588 }
575 } # defined(is_fuchsia) && is_fuchsia 589 } # defined(is_fuchsia) && is_fuchsia
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698