Skip to content

Use ARM macOS frameworks, gen_snapshot_x64 and gen_snapshot_arm64 in the tool #97681

Closed

Description

@jmagman

From #60113 (comment)

Following #97671 and https://flutter-review.googlesource.com/c/recipes/+/26040, FlutterMacOS.framework contains the lipo'd x64 and arm64 engine dylib, and two new gen_snapshot binaries are included with the engine artifacts as follows:

  • bin/cache/artifacts/engine/darwin-x64/gen_snapshot_x64
  • bin/cache/artifacts/engine/darwin-x64/gen_snapshot_arm64
  • bin/cache/artifacts/engine/darwin-x64-profile/gen_snapshot_x64
  • bin/cache/artifacts/engine/darwin-x64-profile/gen_snapshot_arm64
  • bin/cache/artifacts/engine/darwin-x64-release/gen_snapshot_x64
  • bin/cache/artifacts/engine/darwin-x64-release/gen_snapshot_arm64

The tool should switch to using those gen_snapshots, and then we can remove the gen_snapshot that's still there that doesn't have a suffix that specifies the architecture.

Additionally, remove arm64 EXCLUDED_ARCHS (see #72748) so the apps actually start getting built natively.

@zanderso @knopp

Activity

  1. added
    toolAffects the "flutter" command-line tool. See also t: labels.
    platform-macosBuilding on or for macOS specifically
    P3Issues that are less important to the Flutter project
    on Feb 2, 2022
  2. jmagman commented on Feb 11, 2022

    @jmagman
    MemberAuthor

    More thoughts:
    Backend script hardcodes the arch


    should look more like
    '-dIosArchs=${environment['ARCHS'] ?? ''}',

    Here's the local-engine single-arch build setting code for iOS

    // Skip this step for macOS builds.
    if (!useMacOSConfig) {

    If plugins are only built with x86 slices this will also be a problem as it was adopting arm64 iOS simulators #85713

  3. knopp commented on Feb 11, 2022

    @knopp
    Member

    Are there any binary-only plugins? Cocoa-pods plugin shouldn't really care about target architecture, should it?

  4. knopp commented on Feb 11, 2022

    @knopp
    Member

    Also eventually we'd want to get lipo'd gen_snapshots as well.

  5. zanderso commented on Feb 11, 2022

    @zanderso
    Member

    It might make sense to lipo gen_snapshot_arm64, but Dart currently does not support generating x64 code on an arm64 host.

  6. jmagman commented on Feb 11, 2022

    @jmagman
    MemberAuthor

    Are there any binary-only plugins? Cocoa-pods plugin shouldn't really care about target architecture, should it?

    Yes, you can bundle binaries. That's what happened with google_sign_in and google_maps_flutter, they depend on pre-built SDKs which didn't contain ARM.
    https://github.com/CocoaPods/Specs/blob/f052cc63fbbae6566e0998fde5b16decd90d8ef9/Specs/a/d/d/GoogleMaps/5.1.0/GoogleMaps.podspec.json#L350-L352
    https://guides.cocoapods.org/syntax/podspec.html#vendored_frameworks

  7. self-assigned this
    on Feb 15, 2022
  8. jmagman commented on Feb 18, 2022

    @jmagman
    MemberAuthor

    Also need to revert #92508

  9. added
    P1High-priority issues at the top of the work list
    and removed
    P3Issues that are less important to the Flutter project
    on Feb 28, 2022
  10. cbracken commented on Mar 17, 2022

    @cbracken
    Member

    Fixed by #100271.

  11. github-actions commented on Mar 31, 2022

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  12. locked as resolved and limited conversation to collaborators on Mar 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P1High-priority issues at the top of the work listplatform-macosBuilding on or for macOS specificallytoolAffects the "flutter" command-line tool. See also t: labels.

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions