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

[iOS] Build universal gen_snapshots for iOS #54009

Merged
merged 6 commits into from
Jul 24, 2024

Conversation

cbracken
Copy link
Member

@cbracken cbracken commented Jul 19, 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#69157
Issue: flutter/flutter#103386
Fixes: flutter/flutter#152280

This is stacked on top of #54008.

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 changed the title Merge ios macos gen snapshot rules [iOS] Merge iOS/macOS gen_snapshot build rules Jul 19, 2024
@cbracken cbracken changed the title [iOS] Merge iOS/macOS gen_snapshot build rules [iOS] Build universal gen_snapshots for iOS Jul 19, 2024
@cbracken
Copy link
Member Author

cbracken commented Jul 20, 2024

Looks like a failure trying to symlink the iOS simulator SDK in the ios_debug_sim_arm64_extension_safe build where it can't find the simulator SDK.

Will do some digging to see what's up.

@cbracken cbracken force-pushed the merge-ios-macos-gen_snapshot-rules branch 2 times, most recently from 8a03b28 to ade95f2 Compare July 20, 2024 00:42
Copy link
Member

@jmagman jmagman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comment nit

@jmagman
Copy link
Member

jmagman commented Jul 20, 2024

Ruh roh

Cannot find gen_snapshot at /Volumes/Work/s/w/ir/cache/builder/src/out/ci/ios_debug/gen_snapshot_arm64

https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8741937051350649649/+/u/Global_generators/Debug-ios-Flutter.xcframework/stdout

@cbracken cbracken force-pushed the merge-ios-macos-gen_snapshot-rules branch from ade95f2 to 65f71e7 Compare July 24, 2024 18:34
cbracken added 3 commits July 24, 2024 12:30
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
Also order targets alphabetically for consistency.
@cbracken cbracken force-pushed the merge-ios-macos-gen_snapshot-rules branch from 65f71e7 to 7009f0f Compare July 24, 2024 19:43
@cbracken
Copy link
Member Author

Cannot find gen_snapshot at /Volumes/Work/s/w/ir/cache/builder/src/out/ci/ios_debug/gen_snapshot_arm64

Whoops. I guess it would help to actually add the gen_snapshot build target to the targets list in ci/builders/mac_ios_engine.json.

@cbracken cbracken force-pushed the merge-ios-macos-gen_snapshot-rules branch from 8fe22d7 to 60d916d Compare July 24, 2024 20:55
@cbracken
Copy link
Member Author

cbracken commented Jul 24, 2024

Turns out that generate_snapshot_bin isn't the target we want, it's generate_snapshot_bins. No further comment.

@cbracken cbracken added the autosubmit Merge PR when tree becomes green via auto submit App label Jul 24, 2024
@auto-submit auto-submit bot merged commit eb8fac2 into flutter:main Jul 24, 2024
31 checks passed
@cbracken cbracken deleted the merge-ios-macos-gen_snapshot-rules branch July 24, 2024 21:58
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jul 24, 2024
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Jul 25, 2024
…152278)

flutter/engine@4b95209...eb8fac2

2024-07-24 [email protected] [iOS] Build universal gen_snapshots for iOS (flutter/engine#54009)
2024-07-24 [email protected] Move testing/litetest to pub workspaces. (flutter/engine#54082)
2024-07-24 [email protected] Roll Skia from 1561e2127c6f to 54d1434637a1 (2 revisions) (flutter/engine#54087)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
TytaniumDev pushed a commit to TytaniumDev/flutter that referenced this pull request Aug 7, 2024
…lutter#152278)

flutter/engine@4b95209...eb8fac2

2024-07-24 [email protected] [iOS] Build universal gen_snapshots for iOS (flutter/engine#54009)
2024-07-24 [email protected] Move testing/litetest to pub workspaces. (flutter/engine#54082)
2024-07-24 [email protected] Roll Skia from 1561e2127c6f to 54d1434637a1 (2 revisions) (flutter/engine#54087)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Buchimi pushed a commit to Buchimi/flutter that referenced this pull request Sep 2, 2024
…lutter#152278)

flutter/engine@4b95209...eb8fac2

2024-07-24 [email protected] [iOS] Build universal gen_snapshots for iOS (flutter/engine#54009)
2024-07-24 [email protected] Move testing/litetest to pub workspaces. (flutter/engine#54082)
2024-07-24 [email protected] Roll Skia from 1561e2127c6f to 54d1434637a1 (2 revisions) (flutter/engine#54087)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
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.

Build iOS gen_snapshot_arm64 as arm64 binary to run natively on Apple Silicon
3 participants