Open cbracken opened 2 years ago
oh this is great.
I'm working on rolling swiftshader right now which should unblock arm64.
Also requires https://github.com/flutter/flutter/issues/90425
I've got a patch WIP that switches us over to the clang arm64 toolchain on Apple Silicon macs rather than using Rosetta. We still need to use the x64 toolchain to build gen_snapshot
variant targeting x64 macs.
Are there any updates, or issues we could help with? I'm really looking forward to giving "this" (building the engine without rosetta) another try, so if there is anything I can help with, please let me know :)
Did this fall off? Seems there has been no work or update on this in some time. Is there a arm64 or universal2 binary (using lipo) of the gen_snapshot_x binaries someplace we can manually install to help test with?
+1 seriously there are no more Intel Macs being made
Any progress on this?
Where are we on this?
To post a quick update.
Our top priority is getting Flutter app developers using macOS hosts to the point where none of Flutter's tooling requires Rosetta. This work is tracked in https://github.com/flutter/flutter/issues/69157. Primarily this involves building universal binaries of gen_snapshot
and other executables (flutter_tester
, the libimobiledevice
toolchain, etc.). Thus far, the macOS gen_snapshot
s have been migrated (in https://github.com/flutter/engine/pull/53524 and https://github.com/flutter/engine/pull/53962) and iOS's gen_snapshots
have been migrated (in https://github.com/flutter/engine/pull/54009). Android's gen_snapshots
and the libimobiledevice
toolchain will be next. This is the top priority since there are far more developers building apps with Flutter than there are developers who actively commit to/build the engine/embedders.
Once all of that work is complete, we'll follow up with this issue, which eliminates the need for Rosetta for engine developers, unless opting in to building with the x64 toolchain, which we still want to keep around to address issues with Intel hosts while working on Apple Silicon Macs.
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
tox64
for all macOS engine builds (including cross-compiles targeting arm64), and as such these builds are run under Rosetta.Once this work is done:
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.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. https://github.com/flutter/flutter/issues/115322 is the relevant sub-issue.