Enable cross compilation for windows-arm64#142431
Enable cross compilation for windows-arm64#142431p-b-o wants to merge 1 commit intoflutter:masterfrom p-b-o:windows_arm64_cross_compilation
Conversation
This is available only for master channel.
---
Added option --target-platform {windows-x64, windows-arm64} for flutter
build windows command.
Without this option, it produces an x64 app on windows-x64, and arm64
app on windows-arm64.
This was successfully tested (on windows-x64 and windows-arm64) with:
$ flutter create app
$ cd app
$ flutter build windows
$ flutter build windows --target-platform windows-x64
$ flutter build windows --target-platform windows-arm64
|
It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact "@test-exemption-reviewer" in the #hackers channel in Chat (don't just cc them here, they won't see it! Use Discord!). If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix? Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
|
This PR is the succession of #141930. We have been discussing in a previous PR (#137618) that ephemeral folder should be specialized per architecture. For now, cross compilation would work by reusing same ephemeral folder, but it might break one day. Another issue as well, is how to download flutter artifacts only for one platform. We didn't identify a correct way to do it in our discussions, and it's an open problem. I might come back to work on this later, but for now, this is lower priority. So if someone is willing to work on this, you're more than welcome! Don't hesitate to ping me for review or questions. |
This is available only for master channel.
Added option --target-platform {windows-x64, windows-arm64} for flutter build windows command.
Without this option, it produces an x64 app on windows-x64, and arm64 app on windows-arm64.
This was successfully tested (on windows-x64 and windows-arm64) with: $ flutter create app
$ cd app
$ flutter build windows
$ flutter build windows --target-platform windows-x64 $ flutter build windows --target-platform windows-arm64
Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.