Skip to content

☂️ [macOS] Support building engine on Apple Silicon without Rosetta #103386

@cbracken

Description

@cbracken

Currently, in order to build the engine on an Apple Silicon Mac, either as a host build or a target build, we need to build under Rosetta. This is for several reasons:

As such, we currently hardcode host_cpu to x64 for all macOS engine builds (including cross-compiles targeting arm64), and as such these builds are run under Rosetta.

Once this work is done:

  • We'll want to switch to the (host: arm64 target: arm64) gen_snapshot for arm64 macs rather than the current setup of running (host: x64 target: simarm64) gen_snapshot under Rosetta in the tool. We already support building on arm64 macs) rather than the (host: x64 target: simarm64) gen_snapshot.
  • There is no (host: arm64 target: simx64) gen_snapshot today since there's no support for this in the Dart SDK today. Until that work is prioritised, we'll need to continue generating x64 AOT code using the (host: x64 target: x64) gen_snapshot we use today, under Rosetta.

Doing this is necessary to enable building unit tests in the host arm64 build on macOS. #115322 is the relevant sub-issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listengineflutter/engine related. See also e: labels.platform-macBuilding on or for macOS specificallyteam-engineOwned by Engine teamtriaged-engineTriaged by Engine team

    Type

    No type

    Projects

    Status

    In Progress

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions