OLD | NEW |
---|---|
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 import("gypi_contents.gni") | 5 import("gypi_contents.gni") |
6 import("../runtime_args.gni") | 6 import("../runtime_args.gni") |
7 | 7 |
8 # Generate a resources.cc file for the service isolate without Observatory. | 8 # Generate a resources.cc file for the service isolate without Observatory. |
9 action("gen_resources_cc") { | 9 action("gen_resources_cc") { |
10 visibility = [ ":*" ] # Only targets in this file can see this. | 10 visibility = [ ":*" ] # Only targets in this file can see this. |
(...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
482 rebase_path(vm_isolate_snapshot, root_build_dir), | 482 rebase_path(vm_isolate_snapshot, root_build_dir), |
483 "--output_bin", | 483 "--output_bin", |
484 rebase_path(isolate_snapshot, root_build_dir), | 484 rebase_path(isolate_snapshot, root_build_dir), |
485 "--target_os", | 485 "--target_os", |
486 current_os, | 486 current_os, |
487 "--timestamp_file", | 487 "--timestamp_file", |
488 rebase_path(gen_snapshot_stamp_file, root_build_dir), | 488 rebase_path(gen_snapshot_stamp_file, root_build_dir), |
489 ] | 489 ] |
490 } | 490 } |
491 | 491 |
492 action("generate_dfe_snapshot") { | |
zra
2017/01/26 20:55:00
This should try to use the "application_snapshot"
Siggi Cherem (dart-lang)
2017/01/26 22:38:13
DBC - I like the idea of moving this. Two small re
rmacnak
2017/01/26 23:48:45
Change to application_snapshot template and moved
| |
493 deps = [ | |
494 "../bin:dart($host_toolchain)", | |
495 ] | |
496 | |
497 package_map = rebase_path("../../.packages") | |
498 dfe_script = rebase_path("../tools/kernel-service.dart") | |
499 dfe_snapshot = "$root_out_dir/kernel-service.dart.snapshot" | |
500 training_script = | |
501 "file://" + rebase_path("../../pkg/compiler/lib/src/dart2js.dart") | |
502 dart_dir = get_label_info("../bin:dart($host_toolchain)", "root_out_dir") | |
503 dart_path = rebase_path("$dart_dir/dart") | |
504 | |
505 inputs = [ | |
506 package_map, | |
507 dfe_script, | |
508 ] | |
509 | |
510 outputs = [ | |
511 dfe_snapshot, | |
512 ] | |
513 | |
514 script = rebase_path("../../build/gn_run_binary.py") | |
515 args = [ | |
516 "exec_script", | |
517 dart_path, | |
518 "--snapshot=" + rebase_path(dfe_snapshot), | |
519 "--snapshot-kind=app-jit", | |
520 "--packages=" + package_map, | |
521 dfe_script, | |
522 training_script, | |
523 ] | |
524 } | |
525 | |
492 action("generate_snapshot_file") { | 526 action("generate_snapshot_file") { |
493 deps = [ | 527 deps = [ |
494 ":generate_snapshot_bin", | 528 ":generate_snapshot_bin", |
495 ] | 529 ] |
496 | 530 |
497 snapshot_in_cc_file = "snapshot_in.cc" | 531 snapshot_in_cc_file = "snapshot_in.cc" |
498 inputs = [ | 532 inputs = [ |
499 "../tools/create_snapshot_file.py", | 533 "../tools/create_snapshot_cc.py", |
500 snapshot_in_cc_file, | 534 snapshot_in_cc_file, |
501 "$target_gen_dir/vm_isolate_snapshot.bin", | 535 "$target_gen_dir/vm_isolate_snapshot.bin", |
502 "$target_gen_dir/isolate_snapshot.bin", | 536 "$target_gen_dir/isolate_snapshot.bin", |
503 ] | 537 ] |
504 output = "$root_gen_dir/dart_snapshot.cc" | 538 output = "$root_gen_dir/dart_snapshot.cc" |
505 outputs = [ | 539 outputs = [ |
506 output, | 540 output, |
507 ] | 541 ] |
508 | 542 |
509 script = "../tools/create_snapshot_file.py" | 543 script = "../tools/create_snapshot_cc.py" |
510 args = [ | 544 args = [ |
511 "--vm_input_bin", | 545 "--vm_input_bin", |
512 rebase_path("$target_gen_dir/vm_isolate_snapshot.bin"), | 546 rebase_path("$target_gen_dir/vm_isolate_snapshot.bin"), |
513 "--input_bin", | 547 "--input_bin", |
514 rebase_path("$target_gen_dir/isolate_snapshot.bin"), | 548 rebase_path("$target_gen_dir/isolate_snapshot.bin"), |
515 "--input_cc", | 549 "--input_cc", |
516 rebase_path(snapshot_in_cc_file), | 550 rebase_path(snapshot_in_cc_file), |
517 "--output", | 551 "--output", |
518 rebase_path(output), | 552 rebase_path(output), |
519 ] | 553 ] |
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
846 ] | 880 ] |
847 if (is_linux || is_android) { | 881 if (is_linux || is_android) { |
848 cflags = [ "-fPIC" ] | 882 cflags = [ "-fPIC" ] |
849 } | 883 } |
850 if (is_win) { | 884 if (is_win) { |
851 libs = [ "dart.lib" ] | 885 libs = [ "dart.lib" ] |
852 abs_root_out_dir = rebase_path(root_out_dir) | 886 abs_root_out_dir = rebase_path(root_out_dir) |
853 ldflags = [ "/LIBPATH:$abs_root_out_dir" ] | 887 ldflags = [ "/LIBPATH:$abs_root_out_dir" ] |
854 } | 888 } |
855 } | 889 } |
OLD | NEW |