OLD | NEW |
1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 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 # This file has rules for making Dart packages and Dart-based Mojo applications. | 5 # This file has rules for making Dart packages and Dart-based Mojo applications. |
6 # | 6 # |
7 # Entrypoint rules are: | 7 # Entrypoint rules are: |
8 # - dart_pkg | 8 # - dart_pkg |
9 # - dartzip_package | 9 # - dartzip_package |
10 # - dartzip_packaged_application | 10 # - dartzip_packaged_application |
11 | 11 |
| 12 import("../mojo.gni") |
12 import("//build/module_args/mojo.gni") | 13 import("//build/module_args/mojo.gni") |
13 import("//build/module_args/dart.gni") | 14 import("//build/module_args/dart.gni") |
14 | 15 |
15 template("dartx") { | 16 template("dartx") { |
16 bundle_prefix = target_name | 17 bundle_prefix = target_name |
17 bundle = "$target_gen_dir/${bundle_prefix}.dartx" | 18 bundle = "$target_gen_dir/${bundle_prefix}.dartx" |
18 snapshot = "$target_gen_dir/${bundle_prefix}_snapshot.bin" | 19 snapshot = "$target_gen_dir/${bundle_prefix}_snapshot.bin" |
| 20 |
| 21 if (mojo_use_prebuilt_dart_snapshotter) { |
| 22 data_deps = [ rebase_path("mojo/public/tools:copy_dart_snapshotter", |
| 23 ".", |
| 24 mojo_root) ] |
| 25 } |
| 26 |
19 dart_snapshotter = "$root_out_dir/dart_snapshotter" | 27 dart_snapshotter = "$root_out_dir/dart_snapshotter" |
20 if (current_toolchain != host_toolchain) { | 28 if (current_toolchain != host_toolchain) { |
21 toolchain_name = get_label_info(host_toolchain, "name") | 29 toolchain_name = get_label_info(host_toolchain, "name") |
22 dart_snapshotter = "$root_out_dir/$toolchain_name/dart_snapshotter" | 30 dart_snapshotter = "$root_out_dir/$toolchain_name/dart_snapshotter" |
23 } | 31 } |
24 | 32 |
25 action("gen_${bundle_prefix}_snapshot") { | 33 action("gen_${bundle_prefix}_snapshot") { |
26 main_dart = invoker.main_dart | 34 main_dart = invoker.main_dart |
27 | 35 |
28 inputs = [ | 36 inputs = [ |
(...skipping 567 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
596 | 604 |
597 rebase_input = rebase_path(input, root_build_dir) | 605 rebase_input = rebase_path(input, root_build_dir) |
598 rebase_output = rebase_path(output, root_build_dir) | 606 rebase_output = rebase_path(output, root_build_dir) |
599 args = [ | 607 args = [ |
600 "--input=$rebase_input", | 608 "--input=$rebase_input", |
601 "--output=$rebase_output", | 609 "--output=$rebase_output", |
602 "--line=$line", | 610 "--line=$line", |
603 ] | 611 ] |
604 } | 612 } |
605 } | 613 } |
OLD | NEW |