| OLD | NEW |
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 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 import("//mojo/public/tools/bindings/mojom.gni") | 5 import("//mojo/public/tools/bindings/mojom.gni") |
| 6 import("//testing/test.gni") | 6 import("//testing/test.gni") |
| 7 | 7 |
| 8 action("generate_test_snapshot_bin") { | 8 action("generate_test_snapshot_bin") { |
| 9 deps = [ | 9 deps = [ |
| 10 "//dart/runtime/bin:gen_snapshot($host_toolchain)", | 10 "//dart/runtime/bin:gen_snapshot($host_toolchain)", |
| 11 ] | 11 ] |
| 12 inputs = [ | 12 inputs = [ |
| 13 "test_snapshot.dart", | 13 "test_snapshot.dart", |
| 14 "//dart/runtime/tools/create_snapshot_bin.py", | 14 "//dart/runtime/tools/create_snapshot_bin.py", |
| 15 "//mojo/dart/embedder/builtin.dart", | 15 "//mojo/dart/embedder/builtin.dart", |
| 16 "//mojo/public/dart/internal.dart", | 16 "//mojo/public/dart/internal.dart", |
| 17 "//mojo/public/dart/src/handle_watcher.dart", | 17 "//mojo/public/dart/src/handle_watcher.dart", |
| 18 "//mojo/public/dart/src/natives.dart", | 18 "//mojo/public/dart/src/natives.dart", |
| 19 "//mojo/public/dart/src/timer_queue.dart", | 19 "//mojo/public/dart/src/timer_queue.dart", |
| 20 ] | 20 ] |
| 21 output = "$target_gen_dir/test_snapshot_gen.bin" | 21 test_vm_isolate_snapshot = "$target_gen_dir/test_vm_isolate_snapshot.bin" |
| 22 test_isolate_snapshot = "$target_gen_dir/test_isolate_snapshot.bin" |
| 22 outputs = [ | 23 outputs = [ |
| 23 output, | 24 test_vm_isolate_snapshot, |
| 25 test_isolate_snapshot, |
| 24 ] | 26 ] |
| 25 | 27 |
| 26 gen_snapshot_dir = | 28 gen_snapshot_dir = |
| 27 get_label_info("//dart/runtime/bin:gen_snapshot($host_toolchain)", | 29 get_label_info("//dart/runtime/bin:gen_snapshot($host_toolchain)", |
| 28 "root_out_dir") | 30 "root_out_dir") |
| 29 script = "//dart/runtime/tools/create_snapshot_bin.py" | 31 script = "//dart/runtime/tools/create_snapshot_bin.py" |
| 30 builtin_path = rebase_path("//mojo/dart/embedder/builtin.dart") | 32 builtin_path = rebase_path("//mojo/dart/embedder/builtin.dart") |
| 31 internal_path = rebase_path("//mojo/public/dart/internal.dart") | 33 internal_path = rebase_path("//mojo/public/dart/internal.dart") |
| 32 args = [ | 34 args = [ |
| 33 "--executable", | 35 "--executable", |
| 34 rebase_path("$gen_snapshot_dir/gen_snapshot"), | 36 rebase_path("$gen_snapshot_dir/gen_snapshot"), |
| 35 "--package_root", | 37 "--package_root", |
| 36 rebase_path("$root_gen_dir"), | 38 rebase_path("$root_gen_dir"), |
| 37 "--script", | 39 "--script", |
| 38 rebase_path("test_snapshot.dart"), | 40 rebase_path("test_snapshot.dart"), |
| 41 "--vm_output_bin", |
| 42 rebase_path(test_vm_isolate_snapshot, root_build_dir), |
| 39 "--output_bin", | 43 "--output_bin", |
| 40 rebase_path(output, root_build_dir), | 44 rebase_path(test_isolate_snapshot, root_build_dir), |
| 41 "--target_os", | 45 "--target_os", |
| 42 os, | 46 os, |
| 43 "--url_mapping=dart:mojo.builtin,$builtin_path", | 47 "--url_mapping=dart:mojo.builtin,$builtin_path", |
| 44 "--url_mapping=dart:mojo.internal,$internal_path", | 48 "--url_mapping=dart:mojo.internal,$internal_path", |
| 45 ] | 49 ] |
| 46 } | 50 } |
| 47 | 51 |
| 48 action("generate_test_snapshot_file") { | 52 action("generate_test_snapshot_file") { |
| 49 deps = [ | 53 deps = [ |
| 50 ":generate_test_snapshot_bin", | 54 ":generate_test_snapshot_bin", |
| 51 ] | 55 ] |
| 52 inputs = [ | 56 inputs = [ |
| 53 "//dart/runtime/tools/create_snapshot_file.py", | 57 "//dart/runtime/tools/create_snapshot_file.py", |
| 54 "//mojo/dart/embedder/snapshot.cc.tmpl", | 58 "//mojo/dart/embedder/snapshot.cc.tmpl", |
| 55 "$target_gen_dir/test_snapshot_gen.bin", | 59 "$target_gen_dir/test_vm_isolate_snapshot.bin", |
| 60 "$target_gen_dir/test_isolate_snapshot.bin", |
| 56 ] | 61 ] |
| 57 output = "$target_gen_dir/test_snapshot.cc" | 62 output = "$target_gen_dir/test_snapshot.cc" |
| 58 outputs = [ | 63 outputs = [ |
| 59 output, | 64 output, |
| 60 ] | 65 ] |
| 61 | 66 |
| 62 script = "//dart/runtime/tools/create_snapshot_file.py" | 67 script = "//dart/runtime/tools/create_snapshot_file.py" |
| 63 args = [ | 68 args = [ |
| 69 "--vm_input_bin", |
| 70 rebase_path("$target_gen_dir/test_vm_isolate_snapshot.bin"), |
| 64 "--input_bin", | 71 "--input_bin", |
| 65 rebase_path("$target_gen_dir/test_snapshot_gen.bin"), | 72 rebase_path("$target_gen_dir/test_isolate_snapshot.bin"), |
| 66 "--input_cc", | 73 "--input_cc", |
| 67 rebase_path("//mojo/dart/embedder/snapshot.cc.tmpl"), | 74 rebase_path("//mojo/dart/embedder/snapshot.cc.tmpl"), |
| 68 "--output", | 75 "--output", |
| 69 rebase_path(output), | 76 rebase_path(output), |
| 70 ] | 77 ] |
| 71 } | 78 } |
| 72 | 79 |
| 73 # These go into the generated source directory for embedder tests. | 80 # These go into the generated source directory for embedder tests. |
| 74 copy("copy_dart_mojo_sdk") { | 81 copy("copy_dart_mojo_sdk") { |
| 75 sources = [ | 82 sources = [ |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 "//mojo/public/interfaces/bindings/tests:test_interfaces", | 188 "//mojo/public/interfaces/bindings/tests:test_interfaces", |
| 182 "//testing/gtest", | 189 "//testing/gtest", |
| 183 ] | 190 ] |
| 184 } | 191 } |
| 185 | 192 |
| 186 mojom("dart_to_cpp_bindings") { | 193 mojom("dart_to_cpp_bindings") { |
| 187 sources = [ | 194 sources = [ |
| 188 "dart_to_cpp.mojom", | 195 "dart_to_cpp.mojom", |
| 189 ] | 196 ] |
| 190 } | 197 } |
| OLD | NEW |