Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Conversation

@cbracken
Copy link
Member

@cbracken cbracken commented Jul 19, 2024

This is only ever used for gen_snapshot_arm64 where the value will only ever be 'clang_x64'. If we were to migrate builds to arm64 hosts, the gen_snapshot_x64 target would be broken as the script stands today.

This flag is never passed by recipe infra or outside callers, and can thus be safely inlined. The same refactoring was performed for generating universal gen_snapshots in #53954.

A followup patch will update the location where this gen_snapshot binary is generated (and adds an arm64 host binary build), and the merged universal gen_snapshot_${target_cpu} will be written to the root output directory.

This is minor pre-factoring to simplify the followup patch, which migrates to universal binaries for iOS.

Issue: flutter/flutter#101138
Issue: flutter/flutter#69157

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide and the C++, Objective-C, Java style guides.
  • I listed at least one issue that this PR fixes in the description above.
  • I added new tests to check the change I am making or feature I am adding, or the PR is test-exempt. See testing the engine for instructions on writing and running engine tests.
  • I updated/added relevant documentation (doc comments with ///).
  • I signed the CLA.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@cbracken cbracken added the autosubmit Merge PR when tree becomes green via auto submit App label Jul 19, 2024
This is only ever used for gen_snapshot_arm64 where the value will only
ever be 'clang_x64'. If we were to migrate builds to arm64 hosts, the
gen_snapshot_x64 target would be broken as the script stands today.

This flag is never passed by recipe infra or outside callers, and can
thus be safely inlined.

A followup patch will update the location where this gen_snapshot binary
is generated (and adds an arm64 host binary build), and the merged
universal gen_snapshot_${target_cpu} will be written to the root output
directory.
@cbracken cbracken merged commit 77f0cc9 into flutter:main Jul 20, 2024
@cbracken cbracken deleted the eliminate-clang-dir-flag branch July 20, 2024 00:31
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jul 20, 2024
auto-submit bot pushed a commit that referenced this pull request Jul 24, 2024
This merges the macOS and iOS rules for creating the `gen_snapshot_arm64` and `gen_snapshot_x64` used to build for iOS devices, as well as for iOS simulators on both arm64 hosts (`gen_snapshot_arm64`) and x64 hosts (`gen_snapshot_x64`). The macOS rules have already been updated to generate universal binaries for each of these that can be run on both Apple Silicon and Intel Mac hosts.

This also updates `create_full_ios_framework.py` to bundle the newly-generated universal gen_snapshot binaries and produce the artifacts.zip archive that is uploaded via the build config in `mac_ios_engine.json`.

The `create_arm_gen_snapshot` rule remains until I'm 100% convinced it's not used for macOS host Android target builds.

Issue: flutter/flutter#101138
Issue: flutter/flutter#69157

This is stacked on top of #54008.

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

autosubmit Merge PR when tree becomes green via auto submit App

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants