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 import("../../build/compiled_action.gni") | 7 import("../../build/compiled_action.gni") |
8 | 8 |
9 declare_args() { | 9 declare_args() { |
10 # Controls the kind of core snapshot linked into the standalone VM. Using a | 10 # Controls the kind of core snapshot linked into the standalone VM. Using a |
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
457 "builtin_nolib.cc", | 457 "builtin_nolib.cc", |
458 "embedded_dart_io.cc", | 458 "embedded_dart_io.cc", |
459 "embedded_dart_io.h", | 459 "embedded_dart_io.h", |
460 ] | 460 ] |
461 } | 461 } |
462 | 462 |
463 dart_io("standalone_dart_io") { | 463 dart_io("standalone_dart_io") { |
464 extra_sources = [] | 464 extra_sources = [] |
465 } | 465 } |
466 | 466 |
467 action("generate_snapshot_bin") { | 467 compiled_action("generate_snapshot_bin") { |
468 deps = [ | |
469 "../bin:gen_snapshot($host_toolchain)", | |
470 ] | |
471 | |
472 vm_snapshot_data = "$target_gen_dir/vm_snapshot_data.bin" | 468 vm_snapshot_data = "$target_gen_dir/vm_snapshot_data.bin" |
473 vm_snapshot_instructions = "$target_gen_dir/vm_snapshot_instructions.bin" | 469 vm_snapshot_instructions = "$target_gen_dir/vm_snapshot_instructions.bin" |
474 isolate_snapshot_data = "$target_gen_dir/isolate_snapshot_data.bin" | 470 isolate_snapshot_data = "$target_gen_dir/isolate_snapshot_data.bin" |
475 isolate_snapshot_instructions = | 471 isolate_snapshot_instructions = |
476 "$target_gen_dir/isolate_snapshot_instructions.bin" | 472 "$target_gen_dir/isolate_snapshot_instructions.bin" |
477 gen_snapshot_stamp_file = "$target_gen_dir/gen_snapshot.stamp" | 473 |
| 474 inputs = [] |
478 outputs = [ | 475 outputs = [ |
479 vm_snapshot_data, | 476 vm_snapshot_data, |
480 vm_snapshot_instructions, | 477 vm_snapshot_instructions, |
481 isolate_snapshot_data, | 478 isolate_snapshot_data, |
482 isolate_snapshot_instructions, | 479 isolate_snapshot_instructions, |
483 gen_snapshot_stamp_file, | |
484 ] | 480 ] |
485 | 481 tool = ":gen_snapshot" |
486 gen_snapshot_dir = | |
487 get_label_info("../bin:gen_snapshot($host_toolchain)", "root_out_dir") | |
488 | |
489 script = rebase_path("../tools/create_snapshot_bin.py") | |
490 args = [ | 482 args = [ |
491 "--executable", | 483 "--snapshot_kind=" + dart_core_snapshot_kind, |
492 rebase_path("$gen_snapshot_dir/gen_snapshot"), | 484 "--vm_snapshot_data=" + rebase_path(vm_snapshot_data, root_build_dir), |
493 "--snapshot_kind", | 485 "--vm_snapshot_instructions=" + |
494 dart_core_snapshot_kind, | 486 rebase_path(vm_snapshot_instructions, root_build_dir), |
495 "--vm_output_bin", | 487 "--isolate_snapshot_data=" + |
496 rebase_path(vm_snapshot_data, root_build_dir), | 488 rebase_path(isolate_snapshot_data, root_build_dir), |
497 "--vm_instructions_output_bin", | 489 "--isolate_snapshot_instructions=" + |
498 rebase_path(vm_snapshot_instructions, root_build_dir), | 490 rebase_path(isolate_snapshot_instructions, root_build_dir), |
499 "--isolate_output_bin", | |
500 rebase_path(isolate_snapshot_data, root_build_dir), | |
501 "--isolate_instructions_output_bin", | |
502 rebase_path(isolate_snapshot_instructions, root_build_dir), | |
503 "--timestamp_file", | |
504 rebase_path(gen_snapshot_stamp_file, root_build_dir), | |
505 ] | 491 ] |
506 } | 492 } |
507 | 493 |
508 # Generates an assembly file defining a given symbol with the bytes from a | 494 # Generates an assembly file defining a given symbol with the bytes from a |
509 # binary file. Places the symbol in a text section if 'executable' is true, | 495 # binary file. Places the symbol in a text section if 'executable' is true, |
510 # otherwise places the symbol in a read-only data section. | 496 # otherwise places the symbol in a read-only data section. |
511 template("bin_to_assembly") { | 497 template("bin_to_assembly") { |
512 assert(defined(invoker.deps), "Must define deps") | 498 assert(defined(invoker.deps), "Must define deps") |
513 assert(defined(invoker.input), "Must define input binary file") | 499 assert(defined(invoker.input), "Must define input binary file") |
514 assert(defined(invoker.output), "Must define output assembly file") | 500 assert(defined(invoker.output), "Must define output assembly file") |
(...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
938 ] | 924 ] |
939 if (is_linux || is_android) { | 925 if (is_linux || is_android) { |
940 cflags = [ "-fPIC" ] | 926 cflags = [ "-fPIC" ] |
941 } | 927 } |
942 if (is_win) { | 928 if (is_win) { |
943 libs = [ "dart.lib" ] | 929 libs = [ "dart.lib" ] |
944 abs_root_out_dir = rebase_path(root_out_dir) | 930 abs_root_out_dir = rebase_path(root_out_dir) |
945 ldflags = [ "/LIBPATH:$abs_root_out_dir" ] | 931 ldflags = [ "/LIBPATH:$abs_root_out_dir" ] |
946 } | 932 } |
947 } | 933 } |
OLD | NEW |