Skip to content

feat: Support local Windows arm64 engine build - #191560

Open
Gustl22 wants to merge 16 commits into
flutter:masterfrom
Gustl22:96138-vs-2026-engine
Open

Gustl22 wants to merge 16 commits into
flutter:masterfrom
Gustl22:96138-vs-2026-engine

Conversation

@Gustl22

@Gustl22 Gustl22 commented Aug 23, 2026 •

Copy link
Copy Markdown
Contributor

Support building Windows Flutter Engine for Arm64 on an ARM host.
Also adds support for building with Visual Studio 18 (2026) on ARM.

Tested locally via et build -c host_debug_unopt_arm64 on an ARM machine.
CI Testing blocked by #96138

Towards #137161 / #62597

Further resource: https://flutter.dev/go/windows-arm64

Pre-launch Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

If this change needs to override an active code freeze, provide a comment explaining why. The code freeze workflow can be overridden by code reviewers. See pinned issues for any active code freezes with guidance.

Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the gemini-code-assist bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.

@github-actions github-actions Bot added engine flutter/engine related. See also e: labels. team-engine Owned by Engine team d: docs/ flutter/flutter/docs, for contributors labels Aug 23, 2026
@Gustl22
Gustl22 force-pushed the 96138-vs-2026-engine branch from 2883bd1 to c78ce27 Compare August 23, 2026 20:42
@Gustl22

Gustl22 commented Aug 23, 2026 •

Copy link
Copy Markdown
Contributor Author

I also had to turn off incremental linking in flutter\engine\src\build\config\win\BUILD.gn, but I am not sure, whether this is a only me, ARM, or a VS 2026 problem:

default_incremental_linking_switch = incremental_linking_off_switch

Also used a newer Windows SDK version in setup_toolchain.py: SDK_VERSION = '10.0.26100.0', but should work with old ones, too.

@Gustl22
Gustl22 marked this pull request as ready for review September 1, 2026 05:49
@flutter-dashboard

Copy link
Copy Markdown

It looks like this pull request may not have tests. Please make sure to add tests or get an explicit test exemption before merging.

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. If you believe this PR qualifies for a test exemption, contact "@test-exemption-reviewer" in the #hackers channel in Discord (don't just cc them here, they won't see it!). The test exemption team is a small volunteer group, so all reviewers should feel empowered to ask for tests, without delegating that responsibility entirely to the test exemption group.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the Windows development environment documentation to require Visual Studio 2019 or later and the Windows SDK, modifies vs_toolchain.py to support Visual Studio installations using numeric version folders, and adds a new windows/host_debug_unopt_arm64 builder configuration. Review feedback suggests simplifying the Visual Studio version fallback logic in vs_toolchain.py using dict.get with a default value, and updating an exception message to refer to 'Windows SDK' instead of 'Windows 10 SDK' for consistency with the documentation changes.

Comment thread engine/src/build/vs_toolchain.py Resolved
Comment thread engine/src/build/vs_toolchain.py Resolved
@Gustl22

Gustl22 commented Sep 1, 2026 •

Copy link
Copy Markdown
Contributor Author

Note: With VS 2026, one cannot select Windows 10 SDK (only version 10.x, but its actually Windows 11 SDK). So to not raise confusion I would only refer to it as "Windows SDK" without stating hard versions for local engine build. The underlaying issue was resolved, as far as I can tell: https://crbug.com/773476

grafik

Regarding the missing tests: as native ARM pipeline is currently not supported and VS 2026 CIPD is not available (#96138) testing this gets quite difficult. But that's why this PR can set the path towards automating the tests in the future. A chicken-egg-problem...

# Conflicts:
#	engine/src/flutter/ci/builders/local_engine.json
@flutter-dashboard

Copy link
Copy Markdown

It looks like this pull request may not have tests. Please make sure to add tests or get an explicit test exemption before merging.

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. If both you and the PR author believe this PR qualifies for a test exemption, escalate to the tech lead for the changed area to review and apply the test-exempt label. All reviewers should feel empowered to ask for tests before escalating.

@loic-sharma
loic-sharma requested a review from a team November 24, 2026 23:12
@loic-sharma loic-sharma added team-windows Owned by the Windows platform team and removed team-engine Owned by Engine team labels Nov 24, 2026
@github-actions github-actions Bot added team-engine Owned by Engine team and removed team-windows Owned by the Windows platform team labels Nov 25, 2026
@mattkae

mattkae commented Nov 25, 2026

Copy link
Copy Markdown
Contributor

Thanks for the work on this! Should we be able to cross-compile on x86 now? I am running

et build -c host_debug_unopt_arm64

But I get unrecognized arguments: --no-goma

@Gustl22

Gustl22 commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor Author

@mattkae thanks for having a look! Theoretically it should cross-compile as its also supported by the CI build: engine/src/flutter/ci/builders/windows_arm_host_engine.json
I only tried it back then on arm64 host only. But I actually think your error stems from dab7c59 and my change still contained the removed no-goma flag, so I removed it now. My current local test build is still running though :) Build was again successful on arm64 host.

flutter\engine\src> et build -c host_debug_unopt_arm64
[2026-11-25T22:58:27.429][windows/host_debug_unopt_arm64: GN]: OK
[2026-11-25T23:55:02.663][windows/host_debug_unopt_arm64: ninja]: 100.0% (9888/9888) ACTION //flutter/impeller/toolkit/interop:sdk(//build/toolchain/win:clang_arm64)
[2026-11-25T23:55:02.668][windows/host_debug_unopt_arm64: ninja]: OK

@Gustl22
Gustl22 requested a review from mattkae November 25, 2026 23:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

d: docs/ flutter/flutter/docs, for contributors engine flutter/engine related. See also e: labels. missing-tests team-engine Owned by Engine team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants