Skip to content

[NativeAOT] Use native Arm64 toolset on Windows Arm64 machines #117132

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

Merged
merged 1 commit into from
Jun 30, 2025

Conversation

jkotas
Copy link
Member

@jkotas jkotas commented Jun 29, 2025

Fixes #76079

@Copilot Copilot AI review requested due to automatic review settings June 29, 2025 18:59
@jkotas jkotas requested a review from MichalStrehovsky as a code owner June 29, 2025 18:59
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR changes the logic in findvcvarsall.bat to use the native Arm64 toolset on Windows Arm64 machines by updating how the vcEnvironment variable is set based on the processor architecture.

  • Removed old processor architecture checks using PROCESSOR_ARCHITEW6432
  • Added a new conditional block to differentiate between ARM64 and non-ARM64 machines
  • Adjusted vcEnvironment values for parameters "x64", "x86", and "arm64" accordingly
Comments suppressed due to low confidence (1)

src/coreclr/nativeaot/BuildIntegration/findvcvarsall.bat:23

  • [nitpick] Consider adding a comment explaining why the script now solely relies on PROCESSOR_ARCHITECTURE for detecting ARM64 machines, and how this change aligns with the removal of the previous PROCESSOR_ARCHITEW6432 check.
IF /I "%PROCESSOR_ARCHITECTURE%" == "ARM64" (

@jkotas
Copy link
Member Author

jkotas commented Jun 29, 2025

I have verified on Win Arm64 machine that the change works as expected:

Before:

Task Parameter:Command="C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\bin\Hostx86\arm64\link.exe" @"obj\Release\net9.0\win-arm64\native\link.rsp" (TaskId:152)

After:

Task Parameter:Command="C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\bin\Hostarm64\arm64\link.exe" @"obj\Release\net9.0\win-arm64\native\link.rsp" (TaskId:152)

Copy link
Member

@MichalStrehovsky MichalStrehovsky left a comment

Choose a reason for hiding this comment

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

Thanks!

@jkotas jkotas merged commit 17e1cff into dotnet:main Jun 30, 2025
96 of 98 checks passed
@jkotas jkotas deleted the issue-76079 branch June 30, 2025 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[NativeAOT] Switch to native arm64 msvc toolset
2 participants