Skip to content

Commit 0a9f488

Browse files
[beta ] Revert "Ship gen_snapshot for linux-arm64 hosts targeting Android" (#186818)
This is a cherry-pick of this revert, which is needed because the change that was reverted caused a breakage in our release build. Reverts: [Ship gen_snapshot for linux-arm64 hosts targeting Android](#182552) Initiated by: @eyebrowsoffire Reason for reverting: We do not have any bots capable of servicing this builder, and it is breaking our releases as well as `flutter precache --all` Original PR Author: @dbebawy Reviewed By: @reidbaker The original PR description is provided below: ## Summary Enable Android **profile** and **release** builds on ARM64 Linux hosts (AWS Graviton, GCP Tau T2A, self-hosted ARM64 runners, etc.), which currently fail because `gen_snapshot` is only shipped for `linux-x64` hosts. Supersedes #182275 and #182276 — combined into a single atomic commit per reviewer feedback. ### Engine changes - **`BUILD.gn`**: Make `gen_snapshot` and `analyze_snapshot` zip output names host-architecture-aware (`linux-arm64.zip` vs `linux-x64.zip`) using explicit `if (host_os == "linux" && host_cpu == "arm64")` branching, matching the existing pattern for mac/windows. - **`linux_arm64_android_aot_engine.json`** (new): CI builder config following the secondary builder pattern (matching `mac_android_aot_engine.json`). Only produces host-specific archives — shared artifacts (`artifacts.zip`, `symbols.zip`, embedding/abi jars) continue to be produced by the existing x64 Linux builder. - **`.ci.yaml`**: New builder entry with `bringup: true`, `os=Linux`, `cpu=arm64`. ### Framework changes - **`flutter_cache.dart`**: Convert `_linuxBinaryDirs` from a hardcoded `linux-x64` const list to a function parameterized by host architecture, using the existing `cache.getHostPlatformArchName()` pattern from `LinuxEngineArtifacts`. - **`artifacts.dart`**: Clean up stale TODO comment — replace with accurate explanation of why `darwin-arm64` is remapped to `darwin-x64` (universal binary). No Linux remapping needed since Linux ships native binaries per host architecture. - **Tests**: Add tests for both x64 and arm64 host artifact resolution in `cache_test.dart` and `artifacts_test.dart`, following the existing `LinuxEngineArtifacts` test pattern. ### Infrastructure notes - The builder is set to `bringup: true` to allow stabilization before becoming a blocking builder. - Requires ARM64 Linux machines in the LUCI swarming pool (`os=Linux` + `cpu=arm64`). - 8 build configurations: {arm, arm64, x64, riscv64} × {profile, release}. This matches the x64 Linux builder's target coverage. The macOS equivalent has 6 builds (no riscv64). - Uses RBE (`--rbe`) for remote compilation. Fixes #75864 Fixes #168980 https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview [Tree Hygiene]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md [test-exempt]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests [Flutter Style Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md [Features we expect every widget to implement]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement [CLA]: https://cla.developers.google.com/ https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md [Data Driven Fixes]: https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md ## Test plan ### Verified by PR CI (x64 hosts) ### Requires ARM64 Linux hardware (post-bringup) The new `linux_arm64_android_aot_engine` builder is `bringup: true` and does not run on PR checks. The `BUILD.gn` code path (`host_cpu == "arm64"`) is only exercised on ARM64 hosts. The following need to be validated once the builder runs on ARM64 infrastructure: --------- <!-- Thanks for filing a pull request! Reviewers are typically assigned within a week of filing a request. To learn more about code review, see our documentation on Tree Hygiene: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md --> *Replace this paragraph with a description of what this PR is changing or adding, and why. Consider including before/after screenshots.* *List which issues are fixed by this PR. You must list at least one issue. An issue is not required if the PR fixes something trivial like a typo.* *If you had to change anything in the [flutter/tests] repo, include a link to the migration guide as per the [breaking change policy].* If this change needs to override an active code freeze, provide a comment explaining why. The code freeze workflow can be overridden by code reviewers. See pinned issues for any active code freezes with guidance. **Note**: The Flutter team is currently trialing the use of [Gemini Code Assist for GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code). Comments from the `gemini-code-assist` bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.
1 parent ac63f7b commit 0a9f488

7 files changed

Lines changed: 42 additions & 519 deletions

File tree

engine/src/flutter/.ci.yaml

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -302,26 +302,6 @@ targets:
302302
# at https://github.com/flutter/flutter/issues/152186.
303303
cores: "8"
304304

305-
- name: Linux linux_arm64_android_aot_engine
306-
bringup: true
307-
recipe: engine_v2/engine_v2
308-
timeout: 120
309-
properties:
310-
add_recipes_cq: "true"
311-
release_build: "true"
312-
config_name: linux_arm64_android_aot_engine
313-
# Do not remove(https://github.com/flutter/flutter/issues/144644)
314-
# Scheduler will fail to get the platform
315-
drone_dimensions:
316-
- os=Linux
317-
- cpu=arm64
318-
dimensions:
319-
# This is needed so that orchestrators that only spawn subbuilds are not
320-
# assigned to the large 32 core workers when doing release builds.
321-
# For more details see the issue
322-
# at https://github.com/flutter/flutter/issues/152186.
323-
cores: "8"
324-
325305
- name: Linux linux_android_aot_engine_ddm
326306
recipe: engine_v2/engine_v2
327307
timeout: 120

engine/src/flutter/ci/builders/linux_arm64_android_aot_engine.json

Lines changed: 0 additions & 357 deletions
This file was deleted.

0 commit comments

Comments
 (0)