Skip to content

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

Merged
jkotas merged 1 commit into
dotnet:mainfrom
jkotas:issue-76079
Jun 30, 2025
Merged

[NativeAOT] Use native Arm64 toolset on Windows Arm64 machines#117132
jkotas merged 1 commit into
dotnet:mainfrom
jkotas:issue-76079

Conversation

@jkotas

@jkotas jkotas commented Jun 29, 2025

Copy link
Copy Markdown
Member

Fixes #76079

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

Copilot AI 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.

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

jkotas commented Jun 29, 2025

Copy link
Copy Markdown
Member Author

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)

@MichalStrehovsky MichalStrehovsky left a comment

Copy link
Copy Markdown
Member

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
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 31, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[NativeAOT] Switch to native arm64 msvc toolset

3 participants