Repository navigation
Conversation
2883bd1 to
c78ce27
Compare
|
I also had to turn off incremental linking in Also used a newer Windows SDK version in setup_toolchain.py: |
|
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. |
There was a problem hiding this comment.
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.
| vc_version = VC_VERSIONS.get(env_version) | ||
| if not vc_version: | ||
| # Fall back to MSVS version, when not installed by year | ||
| vc_version = VC_VERSIONS.get(MSVS_VERSION_ALIASES.get(env_version)) | ||
| if not vc_version: | ||
| raise KeyError(env_version) |
There was a problem hiding this comment.
The fallback logic for looking up the Visual Studio version can be simplified by using dict.get with a default value. This avoids nested conditional checks and redundant dictionary lookups, making the code cleaner and more readable.
| vc_version = VC_VERSIONS.get(env_version) | |
| if not vc_version: | |
| # Fall back to MSVS version, when not installed by year | |
| vc_version = VC_VERSIONS.get(MSVS_VERSION_ALIASES.get(env_version)) | |
| if not vc_version: | |
| raise KeyError(env_version) | |
| year_version = MSVS_VERSION_ALIASES.get(env_version, env_version) | |
| vc_version = VC_VERSIONS.get(year_version) | |
| if not vc_version: | |
| raise KeyError(env_version) |
There was a problem hiding this comment.
Actually I find the current implementation more intuitive to follow than hidden in the get logic. But no hard feelings about that.
|
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
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... |

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_arm64on an ARM machine.CI Testing blocked by #96138, #193413
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-assistbot 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.