From b919945af86b3bdb1b99906ec0a7f7adb7046355 Mon Sep 17 00:00:00 2001 From: Chase Latta Date: Tue, 7 Jul 2020 11:16:50 -0700 Subject: [PATCH] include list_libraries.dart as a snapshot for fuchsia (#19567) --- shell/platform/fuchsia/BUILD.gn | 7 +++++++ shell/platform/fuchsia/dart/BUILD.gn | 11 +++++++++++ tools/fuchsia/build_fuchsia_artifacts.py | 2 ++ 3 files changed, 20 insertions(+) diff --git a/shell/platform/fuchsia/BUILD.gn b/shell/platform/fuchsia/BUILD.gn index 050719ec7f62..bedafe92d06f 100644 --- a/shell/platform/fuchsia/BUILD.gn +++ b/shell/platform/fuchsia/BUILD.gn @@ -45,11 +45,13 @@ if (is_fuchsia) { _kernel_compiler_label = "dart:kernel_compiler($host_toolchain)" _frontend_server_label = "//flutter/flutter_frontend_server:frontend_server($host_toolchain)" + _list_libraries_label = "dart:list_libraries($host_toolchain)" deps = [ _frontend_server_label, _gen_snapshot_to_use, _kernel_compiler_label, + _list_libraries_label, ] _gen_snapshot_bin_path = @@ -64,10 +66,15 @@ if (is_fuchsia) { rebase_path(get_label_info(_frontend_server_label, "root_gen_dir") + "/frontend_server.dart.snapshot") + _list_libraries_path = + rebase_path(get_label_info(_list_libraries_label, "root_gen_dir") + + "/list_libraries.dart.snapshot") + sources = [ _frontend_server_path, _gen_snapshot_bin_path, _kernel_compiler_path, + _list_libraries_path, ] } diff --git a/shell/platform/fuchsia/dart/BUILD.gn b/shell/platform/fuchsia/dart/BUILD.gn index 72651af12a1c..6b671b5082f2 100644 --- a/shell/platform/fuchsia/dart/BUILD.gn +++ b/shell/platform/fuchsia/dart/BUILD.gn @@ -38,3 +38,14 @@ application_snapshot("kernel_compiler") { inputs = kernel_compiler_files } + +application_snapshot("list_libraries") { + main_dart = "//third_party/dart/pkg/vm/bin/list_libraries.dart" + training_args = [ + # train against the dill file which is generated for this snapshot. If this build file + # changes location this path will need to be updated. + rebase_path( + root_gen_dir + + "/flutter/shell/platform/fuchsia/dart/list_libraries.dart.dill"), + ] +} diff --git a/tools/fuchsia/build_fuchsia_artifacts.py b/tools/fuchsia/build_fuchsia_artifacts.py index 09ac6684e63d..37027c500e6e 100755 --- a/tools/fuchsia/build_fuchsia_artifacts.py +++ b/tools/fuchsia/build_fuchsia_artifacts.py @@ -115,6 +115,8 @@ def CopyGenSnapshotIfExists(source, destination): destination_base, 'kernel_compiler.snapshot') FindFileAndCopyTo('frontend_server.dart.snapshot', source_root, destination_base, 'flutter_frontend_server.snapshot') + FindFileAndCopyTo('list_libraries.dart.snapshot', source_root, + destination_base, 'list_libraries.snapshot') def CopyFlutterTesterBinIfExists(source, destination):