flutter icon indicating copy to clipboard operation
flutter copied to clipboard

Enable flutter engine artifacts for Windows on Arm

Open pbo-linaro opened this issue 3 years ago • 7 comments

Use case

To support targeting Windows on Arm platform (https://github.com/flutter/flutter/issues/62597), we need first to enable artifacts for flutter engine on this platform.

Proposal

Engine can be cross-compiled from a x64 machine by using:

python3 ./flutter/tools/gn --no-goma --windows-cpu arm64
ninja -C out/host_debug_arm64

I'll create a patch for recipe file. Thanks @loic-sharma for proposing to help upstream this patch.

pbo-linaro avatar Nov 24 '22 16:11 pbo-linaro

@loic-sharma Tried to create a gerrit change for that, but it confirms I don't have access.

The commit to upstream is here, based on what was done for darwin-arm64.

pbo-linaro avatar Dec 01 '22 13:12 pbo-linaro

Hello, thanks for the patch! I apologize for the delay, I was off last week.

I kicked off a test run of your changes, that failed on the Zip windows-arm64 windows-arm64-embedder.zip step:

IOError: [Errno 2] No such file or directory: u'C:\b\s\w\ir\cache\builder\src\out/host_debug_arm64/flutter_embedder.h'

Please let me know when you're ready for me to run another test!

loic-sharma avatar Dec 06 '22 01:12 loic-sharma

Thanks @loic-sharma . No problem, you said you were out :)

I pushed two other commits here, to fix the issue you mentioned (regarding font), and removed the embedder package for now (not sure what it is used for).

Feel free to squash commits to have a single patch. For now, I just try to keep commits splitted to track history of this patch.

pbo-linaro avatar Dec 06 '22 14:12 pbo-linaro

Here's the latest result: https://ci.chromium.org/raw/build/logs.chromium.org/flutter/led/loicsharma_google.com/c0e4ff1860fc1c4916a177502cc4cfb0fad1d20aa848aac5b68add72334199f0/+/build.proto?server=chromium-swarm.appspot.com

( 321 ms )C:\b\s\w\ir\cache\builder\src\out\host_release_arm64\zip_archives\windows-arm64\font-subset.zip not found ( 319 ms )Files in parent directory of safe_upload request [WinError 3] The system cannot find the path specified: 'C:\b\s\w\ir\cache\builder\src\out\host_release_arm64\zip_archives\windows-arm64'

loic-sharma avatar Dec 06 '22 21:12 loic-sharma

I removed the font subset as it does not seem to be built when building for windows-arm64. Still here.

pbo-linaro avatar Dec 07 '22 07:12 pbo-linaro

Here's the latest build: https://ci.chromium.org/raw/build/logs.chromium.org/flutter/led/loicsharma_google.com/b765281e408ff608bc165ac7291626f93782efeac52f2d4936eb64a7482f9847/+/build.proto?server=chromium-swarm.appspot.com

It looks like it passed! (The final step fails, but that seems like an unrelated permission issue)

loic-sharma avatar Dec 07 '22 20:12 loic-sharma

Ok great! I squashed all commits, and rebased it on top of master.

Could you submit it for review please, and post the link here?

pbo-linaro avatar Dec 08 '22 07:12 pbo-linaro

Here's the changelist: https://flutter-review.git.corp.google.com/c/recipes/+/37085

FYI there will be an infrastructure freeze from December 20th to January 4th due to the holidays. That might affect your ARM64 work.

loic-sharma avatar Dec 09 '22 01:12 loic-sharma

FYI, @godofredoc left a comment that you will also need to modify this: https://github.com/flutter/engine/tree/main/ci/builders

loic-sharma avatar Dec 09 '22 02:12 loic-sharma

Public link to CL: https://flutter-review.googlesource.com/c/recipes/+/37085

godofredoc avatar Dec 09 '22 02:12 godofredoc

Thanks, I'll answer on CL from now.

pbo-linaro avatar Dec 09 '22 13:12 pbo-linaro

From CL, it appears the "recipes" approach will be dropped in favor of a new solution, directly integrated in flutter engine repo, from January 2023. Thus, this seems to be the best approach at that time, and I'll do a PR for that.

pbo-linaro avatar Dec 16 '22 10:12 pbo-linaro

Created PR on engine to add support for arm64 artifacts.

pbo-linaro avatar Dec 19 '22 09:12 pbo-linaro

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.

github-actions[bot] avatar Jul 14 '23 07:07 github-actions[bot]