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

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

Issue 2902313004: CoreJIT snapshots without training. (Closed)
Patch Set: . Created 3 years, 6 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 | runtime/bin/gen_snapshot.cc » ('j') | runtime/vm/clustered_snapshot.cc » ('J')
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 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 # Generate a resources.cc file for the service isolate without Observatory. 9 # Generate a resources.cc file for the service isolate without Observatory.
10 action("gen_resources_cc") { 10 action("gen_resources_cc") {
(...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after
453 453
454 dart_io("standalone_dart_io") { 454 dart_io("standalone_dart_io") {
455 extra_sources = [] 455 extra_sources = []
456 } 456 }
457 457
458 action("generate_snapshot_bin") { 458 action("generate_snapshot_bin") {
459 deps = [ 459 deps = [
460 "../bin:gen_snapshot($host_toolchain)", 460 "../bin:gen_snapshot($host_toolchain)",
461 ] 461 ]
462 462
463 vm_isolate_snapshot = "$target_gen_dir/vm_isolate_snapshot.bin" 463 vm_snapshot_data = "$target_gen_dir/vm_snapshot_data.bin"
464 isolate_snapshot = "$target_gen_dir/isolate_snapshot.bin" 464 vm_snapshot_instructions = "$target_gen_dir/vm_snapshot_instructions.bin"
465 isolate_snapshot_data = "$target_gen_dir/isolate_snapshot_data.bin"
466 isolate_snapshot_instructions =
467 "$target_gen_dir/isolate_snapshot_instructions.bin"
465 gen_snapshot_stamp_file = "$target_gen_dir/gen_snapshot.stamp" 468 gen_snapshot_stamp_file = "$target_gen_dir/gen_snapshot.stamp"
466 outputs = [ 469 outputs = [
467 vm_isolate_snapshot, 470 vm_snapshot_data,
468 isolate_snapshot, 471 vm_snapshot_instructions,
472 isolate_snapshot_data,
473 isolate_snapshot_instructions,
469 gen_snapshot_stamp_file, 474 gen_snapshot_stamp_file,
470 ] 475 ]
471 476
477 snapshot_kind = "core"
478
479 # Putting code in the core snapshot breaks tests that use non-default flags.
480 # snapshot_kind = "core-jit"
481
472 gen_snapshot_dir = 482 gen_snapshot_dir =
473 get_label_info("../bin:gen_snapshot($host_toolchain)", "root_out_dir") 483 get_label_info("../bin:gen_snapshot($host_toolchain)", "root_out_dir")
474 484
475 script = rebase_path("../tools/create_snapshot_bin.py") 485 script = rebase_path("../tools/create_snapshot_bin.py")
476 args = [ 486 args = [
477 "--executable", 487 "--executable",
478 rebase_path("$gen_snapshot_dir/gen_snapshot"), 488 rebase_path("$gen_snapshot_dir/gen_snapshot"),
479 "--snapshot_kind", 489 "--snapshot_kind",
480 "core", 490 snapshot_kind,
481 "--vm_output_bin", 491 "--vm_output_bin",
482 rebase_path(vm_isolate_snapshot, root_build_dir), 492 rebase_path(vm_snapshot_data, root_build_dir),
493 "--vm_instructions_output_bin",
494 rebase_path(vm_snapshot_instructions, root_build_dir),
483 "--isolate_output_bin", 495 "--isolate_output_bin",
484 rebase_path(isolate_snapshot, root_build_dir), 496 rebase_path(isolate_snapshot_data, root_build_dir),
485 "--target_os", 497 "--isolate_instructions_output_bin",
486 current_os, 498 rebase_path(isolate_snapshot_instructions, root_build_dir),
487 "--timestamp_file", 499 "--timestamp_file",
488 rebase_path(gen_snapshot_stamp_file, root_build_dir), 500 rebase_path(gen_snapshot_stamp_file, root_build_dir),
489 ] 501 ]
490 } 502 }
491 503
492 # Generates an assembly file defining a given symbol with the bytes from a 504 # Generates an assembly file defining a given symbol with the bytes from a
493 # binary file. Places the symbol in a text section if 'executable' is true, 505 # binary file. Places the symbol in a text section if 'executable' is true,
494 # otherwise places the symbol in a read-only data section. 506 # otherwise places the symbol in a read-only data section.
495 template("bin_to_assembly") { 507 template("bin_to_assembly") {
496 assert(defined(invoker.deps), "Must define deps") 508 assert(defined(invoker.deps), "Must define deps")
(...skipping 25 matching lines...) Expand all
522 outputs = [ 534 outputs = [
523 invoker.output, 535 invoker.output,
524 ] 536 ]
525 } 537 }
526 } 538 }
527 539
528 bin_to_assembly("vm_snapshot_data_assembly") { 540 bin_to_assembly("vm_snapshot_data_assembly") {
529 deps = [ 541 deps = [
530 ":generate_snapshot_bin", 542 ":generate_snapshot_bin",
531 ] 543 ]
532 input = "$target_gen_dir/vm_isolate_snapshot.bin" 544 input = "$target_gen_dir/vm_snapshot_data.bin"
533 output = "$target_gen_dir/vm_snapshot_data.S" 545 output = "$target_gen_dir/vm_snapshot_data.S"
534 symbol = "kDartVmSnapshotData" 546 symbol = "kDartVmSnapshotData"
535 executable = false 547 executable = false
536 } 548 }
537 549
538 bin_to_assembly("vm_snapshot_instructions_assembly") { 550 bin_to_assembly("vm_snapshot_instructions_assembly") {
539 deps = [] 551 deps = [
540 input = "../tools/empty.bin" 552 ":generate_snapshot_bin",
553 ]
554 input = "$target_gen_dir/vm_snapshot_instructions.bin"
541 output = "$target_gen_dir/vm_snapshot_instructions.S" 555 output = "$target_gen_dir/vm_snapshot_instructions.S"
542 symbol = "kDartVmSnapshotInstructions" 556 symbol = "kDartVmSnapshotInstructions"
543 executable = true 557 executable = true
544 } 558 }
545 559
546 bin_to_assembly("isolate_snapshot_data_assembly") { 560 bin_to_assembly("isolate_snapshot_data_assembly") {
547 deps = [ 561 deps = [
548 ":generate_snapshot_bin", 562 ":generate_snapshot_bin",
549 ] 563 ]
550 input = "$target_gen_dir/isolate_snapshot.bin" 564 input = "$target_gen_dir/isolate_snapshot_data.bin"
551 output = "$target_gen_dir/isolate_snapshot_data.S" 565 output = "$target_gen_dir/isolate_snapshot_data.S"
552 symbol = "kDartCoreIsolateSnapshotData" 566 symbol = "kDartCoreIsolateSnapshotData"
553 executable = false 567 executable = false
554 } 568 }
555 569
556 bin_to_assembly("isolate_snapshot_instructions_assembly") { 570 bin_to_assembly("isolate_snapshot_instructions_assembly") {
557 deps = [] 571 deps = [
558 input = "../tools/empty.bin" 572 ":generate_snapshot_bin",
573 ]
574 input = "$target_gen_dir/isolate_snapshot_instructions.bin"
559 output = "$target_gen_dir/isolate_snapshot_instructions.S" 575 output = "$target_gen_dir/isolate_snapshot_instructions.S"
560 symbol = "kDartCoreIsolateSnapshotInstructions" 576 symbol = "kDartCoreIsolateSnapshotInstructions"
561 executable = true 577 executable = true
562 } 578 }
563 579
564 source_set("dart_snapshot_cc") { 580 source_set("dart_snapshot_cc") {
565 deps = [ 581 deps = [
566 ":isolate_snapshot_data_assembly", 582 ":isolate_snapshot_data_assembly",
567 ":isolate_snapshot_instructions_assembly", 583 ":isolate_snapshot_instructions_assembly",
568 ":vm_snapshot_data_assembly", 584 ":vm_snapshot_data_assembly",
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
912 ] 928 ]
913 if (is_linux || is_android) { 929 if (is_linux || is_android) {
914 cflags = [ "-fPIC" ] 930 cflags = [ "-fPIC" ]
915 } 931 }
916 if (is_win) { 932 if (is_win) {
917 libs = [ "dart.lib" ] 933 libs = [ "dart.lib" ]
918 abs_root_out_dir = rebase_path(root_out_dir) 934 abs_root_out_dir = rebase_path(root_out_dir)
919 ldflags = [ "/LIBPATH:$abs_root_out_dir" ] 935 ldflags = [ "/LIBPATH:$abs_root_out_dir" ]
920 } 936 }
921 } 937 }
OLDNEW
« no previous file with comments | « no previous file | runtime/bin/gen_snapshot.cc » ('j') | runtime/vm/clustered_snapshot.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698