Skip to content

Commit 3be9238

Browse files
committed
Select the native toolchain on Windows ARM64
1 parent b45060a commit 3be9238

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

‎.github/workflows/reusable-windows.yml‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,17 @@ jobs:
3737
- name: Register MSVC problem matcher
3838
if: inputs.arch != 'Win32'
3939
run: echo "::add-matcher::.github/problem-matchers/msvc.json"
40+
- name: Select native ARM64 MSBuild
41+
if: inputs.arch == 'arm64'
42+
shell: pwsh
43+
run: |
44+
# The x86-hosted linker can run out of heap space during LTCG.
45+
$vswhere = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe"
46+
$msbuild = & $vswhere -latest -products '*' -requires Microsoft.VisualStudio.Component.VC.Tools.ARM64 -find 'MSBuild\Current\Bin\arm64\MSBuild.exe'
47+
if (!$msbuild -or !(Test-Path -LiteralPath $msbuild -PathType Leaf)) {
48+
throw 'Native ARM64 MSBuild was not found.'
49+
}
50+
('MSBUILD="{0}"' -f $msbuild) >> $env:GITHUB_ENV
4051
- name: Build CPython
4152
# msvc::musttail is not supported for debug builds, so we have to
4253
# switch to release.

0 commit comments

Comments
 (0)