-
Notifications
You must be signed in to change notification settings - Fork 26.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support --local-engine when for single CPU architecture AOT builds on macOS #100804
Comments
@cbracken looks like macOS needs to be audited for local engine single-architecture issues. flutter/packages/flutter_tools/lib/src/ios/xcode_build_settings.dart Lines 189 to 201 in a618ca2
|
- "-dDarwinArchs=x86_64 arm64"
+ "-dDarwinArchs=${ARCHS}" like this:
|
Jason's logs also show:
|
"-dDarwinArchs=x86_64 arm64" is also incorrect since it shouldn't build both in debug mode. |
I'll patch that bit in the engine build rather than in the tool, as we do for iOS. |
Moves //flutter/build/archives:create_macos_gen_snapshots target to //flutter/lib/snapshot:create_macos_gen_snapshots and make it part of the :generate_bin_snapshots target in that BUILD.gn file. This makes it part of the default build. When performing a Flutter build using the --local-engine option, the flutter tool looks for the architecture-specific gen_snapshot name, as it does with iOS builds. As such, we should be building the architecture-specific gen_snapshot binary as part of the default build for the given architecture. Issue: flutter/flutter#100804
Patch is out at flutter/engine#32326. That said, it's important to note that the correct local engine to point to for macOS builds is a local engine built with FWIW it should work fine if you're building on and targeting x64, but I could imagine us tightening things up one day, so we should probably encourage people to use a Mac target build. |
@cbracken can you update https://github.com/flutter/flutter/wiki/Compiling-the-engine#compiling-for-macos-or-linux to make that clear? |
Will do. To be clear, flutter/engine#32326 will get things working with a host build (as well as target builds) right now, but long-term I could imagine things diverging enough that it's no longer the case. |
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 |
I'm seeing errors when I run
flutter run --local-engine host_profile --profile
on a Mac x64 host using the current engine and flutter_tools.flutter_tools reports that it can't find
gen_snapshot_x64
orgen_snapshot_arm64
and that theFlutterMacOS.framework
binaries are x64 only.This is related to some of the recent flutter_tools changes for enabling ARM64 support (a618ca2, fd3c34c)
@jmagman @cbracken
The text was updated successfully, but these errors were encountered: