Skip to content

Commit b919945

Browse files
authored
include list_libraries.dart as a snapshot for fuchsia (flutter#19567)
1 parent de0932b commit b919945

File tree

3 files changed

+20
-0
lines changed

3 files changed

+20
-0
lines changed

shell/platform/fuchsia/BUILD.gn

+7
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,13 @@ if (is_fuchsia) {
4545
_kernel_compiler_label = "dart:kernel_compiler($host_toolchain)"
4646
_frontend_server_label =
4747
"//flutter/flutter_frontend_server:frontend_server($host_toolchain)"
48+
_list_libraries_label = "dart:list_libraries($host_toolchain)"
4849

4950
deps = [
5051
_frontend_server_label,
5152
_gen_snapshot_to_use,
5253
_kernel_compiler_label,
54+
_list_libraries_label,
5355
]
5456

5557
_gen_snapshot_bin_path =
@@ -64,10 +66,15 @@ if (is_fuchsia) {
6466
rebase_path(get_label_info(_frontend_server_label, "root_gen_dir") +
6567
"/frontend_server.dart.snapshot")
6668

69+
_list_libraries_path =
70+
rebase_path(get_label_info(_list_libraries_label, "root_gen_dir") +
71+
"/list_libraries.dart.snapshot")
72+
6773
sources = [
6874
_frontend_server_path,
6975
_gen_snapshot_bin_path,
7076
_kernel_compiler_path,
77+
_list_libraries_path,
7178
]
7279
}
7380

shell/platform/fuchsia/dart/BUILD.gn

+11
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,14 @@ application_snapshot("kernel_compiler") {
3838

3939
inputs = kernel_compiler_files
4040
}
41+
42+
application_snapshot("list_libraries") {
43+
main_dart = "//third_party/dart/pkg/vm/bin/list_libraries.dart"
44+
training_args = [
45+
# train against the dill file which is generated for this snapshot. If this build file
46+
# changes location this path will need to be updated.
47+
rebase_path(
48+
root_gen_dir +
49+
"/flutter/shell/platform/fuchsia/dart/list_libraries.dart.dill"),
50+
]
51+
}

tools/fuchsia/build_fuchsia_artifacts.py

+2
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,8 @@ def CopyGenSnapshotIfExists(source, destination):
115115
destination_base, 'kernel_compiler.snapshot')
116116
FindFileAndCopyTo('frontend_server.dart.snapshot', source_root,
117117
destination_base, 'flutter_frontend_server.snapshot')
118+
FindFileAndCopyTo('list_libraries.dart.snapshot', source_root,
119+
destination_base, 'list_libraries.snapshot')
118120

119121

120122
def CopyFlutterTesterBinIfExists(source, destination):

0 commit comments

Comments
 (0)