Skip to content

Commit

Permalink
include list_libraries.dart as a snapshot for fuchsia (#19567)
Browse files Browse the repository at this point in the history
  • Loading branch information
chaselatta committed Jul 7, 2020
1 parent de0932b commit b919945
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
7 changes: 7 additions & 0 deletions shell/platform/fuchsia/BUILD.gn
Expand Up @@ -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 =
Expand All @@ -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,
]
}

Expand Down
11 changes: 11 additions & 0 deletions shell/platform/fuchsia/dart/BUILD.gn
Expand Up @@ -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"),
]
}
2 changes: 2 additions & 0 deletions tools/fuchsia/build_fuchsia_artifacts.py
Expand Up @@ -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):
Expand Down

0 comments on commit b919945

Please sign in to comment.