[macOS] Eliminate archive_gen_snapshot target (flutter/engine#53948)

This target produced an unused zipfile named `gen_snapshot.zip` containing the `gen_snapshot_${target_arch}` binary for the current build's target architecture.

The macOS recipe JSON produces the real `gen_snapshot.zip` that gets uploaded to the cloud bucket and pulled down by the tool. See: 29a474fe3e/ci/builders/mac_host_engine.json (L555-L592)

The recipe did, however, rely on the `archive_gen_snapshot` rule to ensure that the underlying `gen_snapshot` targets were actually built. See, for example:
29a474fe3e/ci/builders/mac_host_engine.json (L45)

A few benefits:
* Eliminates an unnecessary zip operation.
* Eliminates confusion from grepping for gen_snapshot.zip and finding the wrong location in the source.
* Grepping for create_macos_gen_snapshots will turn up the usage in the JSON build file.

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
This commit is contained in:
Chris Bracken
2024-07-16 14:44:06 -07:00
committed by GitHub
parent 1125840b1d
commit 22116874ea
2 changed files with 5 additions and 21 deletions

View File

@@ -272,23 +272,7 @@ if (host_os == "win") {
}
}
# Archives Flutter Mac Artifacts
if (is_mac) {
zip_bundle("archive_gen_snapshot") {
deps = [ "//flutter/lib/snapshot:create_macos_gen_snapshots" ]
suffix = "-$flutter_runtime_mode"
if (flutter_runtime_mode == "debug") {
suffix = ""
}
output = "$full_platform_name$suffix/gen_snapshot.zip"
files = [
{
source = "${root_out_dir}/gen_snapshot_${target_cpu}"
destination = "gen_snapshot_${target_cpu}"
},
]
}
group("flutter_embedder_framework") {
deps = [
"//flutter/shell/platform/embedder:flutter_embedder_framework_archive",

View File

@@ -42,11 +42,11 @@
"ninja": {
"config": "ci/host_debug",
"targets": [
"flutter/build/archives:archive_gen_snapshot",
"flutter/build/archives:artifacts",
"flutter/build/archives:dart_sdk_archive",
"flutter/build/archives:flutter_embedder_framework",
"flutter/build/dart:copy_dart_sdk",
"flutter/lib/snapshot:create_macos_gen_snapshots",
"flutter/shell/platform/darwin/macos:zip_macos_flutter_framework",
"flutter/tools/font_subset",
"flutter:unittests"
@@ -127,8 +127,8 @@
"config": "ci/host_profile",
"targets": [
"flutter/build/dart:copy_dart_sdk",
"flutter/build/archives:archive_gen_snapshot",
"flutter/build/archives:artifacts",
"flutter/lib/snapshot:create_macos_gen_snapshots",
"flutter/shell/platform/darwin/macos:zip_macos_flutter_framework",
"flutter:unittests"
]
@@ -214,9 +214,9 @@
"ninja": {
"config": "ci/host_release",
"targets": [
"flutter/build/archives:archive_gen_snapshot",
"flutter/build/archives:artifacts",
"flutter/build/dart:copy_dart_sdk",
"flutter/lib/snapshot:create_macos_gen_snapshots",
"flutter/shell/platform/darwin/macos:zip_macos_flutter_framework",
"flutter/tools/font_subset",
"flutter:unittests"
@@ -298,10 +298,10 @@
"config": "ci/mac_debug_arm64",
"targets": [
"flutter/tools/font_subset",
"flutter/build/archives:archive_gen_snapshot",
"flutter/build/archives:artifacts",
"flutter/build/archives:dart_sdk_archive",
"flutter/build/archives:flutter_embedder_framework",
"flutter/lib/snapshot:create_macos_gen_snapshots",
"flutter/shell/platform/darwin/macos:zip_macos_flutter_framework"
]
},
@@ -442,10 +442,10 @@
"config": "ci/mac_release_arm64",
"targets": [
"flutter:unittests",
"flutter/build/archives:archive_gen_snapshot",
"flutter/build/archives:artifacts",
"flutter/build/dart:copy_dart_sdk",
"flutter/impeller/golden_tests:impeller_golden_tests",
"flutter/lib/snapshot:create_macos_gen_snapshots",
"flutter/shell/platform/darwin/macos:zip_macos_flutter_framework",
"flutter/tools/font_subset"
]