diff --git a/build/flutter_app.gni b/build/flutter_app.gni index f99dbb73720..50857ac1674 100644 --- a/build/flutter_app.gni +++ b/build/flutter_app.gni @@ -9,6 +9,15 @@ import("//flutter/lib/ui/dart_ui.gni") import("//apps/mozart/lib/flutter/sdk_ext/sdk_ext.gni") import("//lib/fidl/dart/sdk_ext/sdk_ext.gni") +gen_snapshot_label = "//dart/runtime/bin:gen_snapshot($host_toolchain)" +gen_snapshot_dir = get_label_info(gen_snapshot_label, "root_out_dir") +gen_snapshot = "$gen_snapshot_dir/gen_snapshot" + +flutter_root = "//lib/flutter" +flutter_tools_label = "$flutter_root/packages/flutter_tools:fuchsia_builder($host_toolchain)" +flutter_tools_out_dir = get_label_info(flutter_tools_label, "root_out_dir") +flutter_tools_bin = "$flutter_tools_out_dir/dart-tools/fuchsia_builder" + # Defines a Flutter application # # Parameters @@ -61,10 +70,6 @@ template("flutter_app") { bundle_name = "${target_name}.flx" } - gen_snapshot_label = "//dart/runtime/bin:gen_snapshot($host_toolchain)" - gen_snapshot_dir = get_label_info(gen_snapshot_label, "root_out_dir") - gen_snapshot = "$gen_snapshot_dir/gen_snapshot" - flutter_core_snapshot_label = "//flutter/lib/snapshot:generate_snapshot_bin" flutter_core_snapshot_gen_dir = get_label_info(flutter_core_snapshot_label, "target_gen_dir") @@ -73,11 +78,6 @@ template("flutter_app") { flutter_core_snapshot_isolate_data = "$flutter_core_snapshot_gen_dir/isolate_snapshot.bin" - flutter_root = "//lib/flutter" - flutter_tools_label = "$flutter_root/packages/flutter_tools:fuchsia_builder($host_toolchain)" - flutter_tools_out_dir = get_label_info(flutter_tools_label, "root_out_dir") - flutter_tools_bin = "$flutter_tools_out_dir/dart-tools/fuchsia_builder" - dot_packages = "$target_gen_dir/$dart_package_name.packages" bundle_path = "$target_gen_dir/$bundle_name" bundle_depfile = "$target_gen_dir/$bundle_name.d" @@ -213,15 +213,6 @@ template("flutter_aot_app") { bundle_name = "${target_name}.flx" } - gen_snapshot_label = "//dart/runtime/bin:gen_snapshot($host_toolchain)" - gen_snapshot_dir = get_label_info(gen_snapshot_label, "root_out_dir") - gen_snapshot = "$gen_snapshot_dir/gen_snapshot" - - flutter_root = "//lib/flutter" - flutter_tools_label = "$flutter_root/packages/flutter_tools($host_toolchain)" - flutter_tools_out_dir = get_label_info(flutter_tools_label, "root_out_dir") - flutter_tools_bin = "$flutter_tools_out_dir/dart-tools/flutter_tools" - dot_packages = "$target_gen_dir/$dart_package_name.packages" bundle_path = "$target_gen_dir/$bundle_name" bundle_depfile = "$target_gen_dir/$bundle_name.d" @@ -270,6 +261,8 @@ template("flutter_aot_app") { rebase_path("//flutter/runtime/dart_vm_entry_points.txt"), "--entry-points-manifest", rebase_path("//flutter/runtime/dart_vm_entry_points_fuchsia.txt"), + "--entry-points-manifest", + rebase_path("//dart/runtime/bin/dart_io_entries.txt"), "--main-dart", rebase_path(main_dart), diff --git a/examples/BUILD.gn b/examples/BUILD.gn index d2430703503..3d6d850afbc 100644 --- a/examples/BUILD.gn +++ b/examples/BUILD.gn @@ -5,6 +5,7 @@ group("examples") { deps = [ "hello_flutter", + "hello_flutter:hello_flutter_aot", "spinning_square", ] } diff --git a/examples/hello_flutter/BUILD.gn b/examples/hello_flutter/BUILD.gn index 8f5027cd225..079febbed06 100644 --- a/examples/hello_flutter/BUILD.gn +++ b/examples/hello_flutter/BUILD.gn @@ -7,3 +7,7 @@ import("//flutter/build/flutter_app.gni") flutter_app("hello_flutter") { main_dart = "lib/main.dart" } + +flutter_aot_app("hello_flutter_aot") { + main_dart = "lib/main.dart" +}