|
4 | 4 |
|
5 | 5 | import("//build/fuchsia/sdk.gni") |
6 | 6 | import("$flutter_root/common/config.gni") |
| 7 | +import("$flutter_root/tools/fuchsia/dart.gni") |
| 8 | +import("$flutter_root/tools/fuchsia/fuchsia_host_bundle.gni") |
7 | 9 |
|
8 | 10 | if (using_fuchsia_sdk) { |
9 | 11 | testonly = true |
10 | 12 |
|
11 | 13 | product_suffix = "" |
| 14 | + is_product = false |
12 | 15 |
|
13 | 16 | if (flutter_runtime_mode == "release") { |
14 | 17 | product_suffix = "product_" |
| 18 | + is_product = true |
| 19 | + } |
| 20 | + |
| 21 | + fuchsia_host_bundle("flutter_binaries") { |
| 22 | + name = "flutter_binaries" |
| 23 | + |
| 24 | + _flutter_tester_label = "//flutter/shell/testing:testing($host_toolchain)" |
| 25 | + |
| 26 | + deps = [ |
| 27 | + _flutter_tester_label, |
| 28 | + ] |
| 29 | + |
| 30 | + _flutter_tester_bin_path = |
| 31 | + rebase_path(get_label_info(_flutter_tester_label, "root_out_dir") + |
| 32 | + "/flutter_tester") |
| 33 | + |
| 34 | + sources = [ |
| 35 | + _flutter_tester_bin_path, |
| 36 | + ] |
| 37 | + } |
| 38 | + |
| 39 | + fuchsia_host_bundle("dart_binaries") { |
| 40 | + name = "dart_binaries" |
| 41 | + |
| 42 | + _gen_snapshot_to_use = gen_snapshot + "($host_toolchain)" |
| 43 | + if (is_product) { |
| 44 | + _gen_snapshot_to_use = gen_snapshot_product + "($host_toolchain)" |
| 45 | + } |
| 46 | + |
| 47 | + _kernel_compiler_label = "dart:kernel_compiler($host_toolchain)" |
| 48 | + |
| 49 | + deps = [ |
| 50 | + _gen_snapshot_to_use, |
| 51 | + _kernel_compiler_label, |
| 52 | + ] |
| 53 | + |
| 54 | + _gen_snapshot_bin_path = |
| 55 | + rebase_path(get_label_info(_gen_snapshot_to_use, "root_out_dir") + "/" + |
| 56 | + get_label_info(_gen_snapshot_to_use, "name")) |
| 57 | + |
| 58 | + _kernel_compiler_path = |
| 59 | + rebase_path(get_label_info(_kernel_compiler_label, "root_gen_dir") + |
| 60 | + "/kernel_compiler.dart.snapshot") |
| 61 | + |
| 62 | + sources = [ |
| 63 | + _gen_snapshot_bin_path, |
| 64 | + _kernel_compiler_path, |
| 65 | + ] |
15 | 66 | } |
16 | 67 |
|
17 | 68 | group("fuchsia") { |
18 | 69 | deps = [ |
19 | | - "dart:kernel_compiler", |
| 70 | + ":dart_binaries", |
| 71 | + ":flutter_binaries", |
20 | 72 | "dart_runner:dart_aot_${product_suffix}runner", |
21 | 73 | "dart_runner:dart_jit_${product_suffix}runner", |
22 | 74 | "flutter:flutter_aot_${product_suffix}runner", |
23 | 75 | "flutter:flutter_jit_${product_suffix}runner", |
24 | | - "flutter:flutter_runner_tests", |
25 | | - "//flutter/shell/testing:testing($host_toolchain)", |
26 | 76 | ] |
27 | 77 | } |
28 | 78 | } |
0 commit comments