From 932759cb03c382e1bd73e6d9eb662ed65118f94c Mon Sep 17 00:00:00 2001 From: Chris Bracken Date: Wed, 30 Mar 2022 13:30:08 -0700 Subject: [PATCH] [macOS] Generate gen_snapshot_$arch by default (flutter/engine#32326) --- engine/src/flutter/build/archives/BUILD.gn | 9 +-------- engine/src/flutter/lib/snapshot/BUILD.gn | 11 +++++++++++ 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/engine/src/flutter/build/archives/BUILD.gn b/engine/src/flutter/build/archives/BUILD.gn index 99f8ae0ab6..2739169b90 100644 --- a/engine/src/flutter/build/archives/BUILD.gn +++ b/engine/src/flutter/build/archives/BUILD.gn @@ -1,5 +1,4 @@ import("//flutter/build/zip_bundle.gni") -import("//flutter/sky/tools/macos_snapshots.gni") zip_bundle("artifacts") { deps = [ @@ -141,14 +140,8 @@ if (is_mac) { ] } - macos_gen_snapshots("create_macos_gen_snapshots") { - visibility = [ ":*" ] - deps = [ "//flutter/lib/snapshot:generate_snapshot_bins" ] - arch = "$target_cpu" - } - zip_bundle("archive_gen_snapshot") { - deps = [ ":create_macos_gen_snapshots" ] + deps = [ "//flutter/lib/snapshot:create_macos_gen_snapshots" ] suffix = "-$flutter_runtime_mode" if (flutter_runtime_mode == "debug") { suffix = "" diff --git a/engine/src/flutter/lib/snapshot/BUILD.gn b/engine/src/flutter/lib/snapshot/BUILD.gn index 825beee812..1dc34fe675 100644 --- a/engine/src/flutter/lib/snapshot/BUILD.gn +++ b/engine/src/flutter/lib/snapshot/BUILD.gn @@ -6,6 +6,7 @@ import("//build/compiled_action.gni") import("//build/fuchsia/sdk.gni") import("//flutter/common/config.gni") import("//flutter/lib/ui/dart_ui.gni") +import("//flutter/sky/tools/macos_snapshots.gni") import("//third_party/dart/utils/compile_platform.gni") group("generate_snapshot_bins") { @@ -16,6 +17,9 @@ group("generate_snapshot_bins") { if (host_os == "mac" && (target_cpu == "arm" || target_cpu == "arm64")) { deps += [ ":create_arm_gen_snapshot" ] } + if (host_os == "mac" && target_os == "mac") { + deps += [ ":create_macos_gen_snapshots" ] + } } compiled_action("generate_snapshot_bin") { @@ -223,6 +227,13 @@ if (host_os == "mac" && (target_cpu == "arm" || target_cpu == "arm64")) { } } +if (host_os == "mac" && target_os == "mac") { + macos_gen_snapshots("create_macos_gen_snapshots") { + deps = [ ":generate_snapshot_bin" ] + arch = "$target_cpu" + } +} + source_set("snapshot") { deps = [ ":isolate_snapshot_data_linkable",