The Windows Arm64 jobs in the CI recently started failing on 3.14 (for example). Noted by @StanFromIreland in #158188 (comment): the _freeze_module
|
<FreezeProjects> |
|
<Platform>$(PreferredToolArchitecture)</Platform> |
can no longer be compiled for
PreferredToolArchitecture=x86 and
PlatformToolset=v143:
The build tools for Visual Studio 2022 (Platform Toolset = 'v143') cannot be found.
PreferredToolArchitecture=x86 is chosen, because we use the x86 version of msbuild in CI:
"C:\Program Files\Microsoft Visual Studio\18\Enterprise\MSBuild\Current\Bin\msbuild.exe"
which is chosen by build.bat if no MSBUILD environment variable is set and msbuild is not in the path. 1
Compiling the _freeze_module for arm64 on an arm64 host by just using the arm64 version of msbuild would solve this, by e.g. just adding
env:
MSBUILD: ${{ inputs.arch == 'arm64' && 'C:\Program Files\Microsoft Visual Studio\18\Enterprise\MSBuild\Current\Bin\arm64\msbuild.exe' || '' }}
to
|
- name: Build CPython |
|
run: >- |
|
.\\PCbuild\\build.bat |
because then
PreferredToolArchitecture=arm64 and also the arm64 version of the compiler is chosen.
I think running the _freeze_module natively on an arm64 host is anyway the better fit?
The Windows Arm64 jobs in the CI recently started failing on 3.14 (for example). Noted by @StanFromIreland in #158188 (comment): the
_freeze_modulecpython/PCbuild/pcbuild.proj
Lines 20 to 21 in 9def455
can no longer be compiled for
PreferredToolArchitecture=x86andPlatformToolset=v143:PreferredToolArchitecture=x86is chosen, because we use thex86version of msbuild in CI:which is chosen by
build.batif noMSBUILDenvironment variable is set and msbuild is not in the path. 1Compiling the
_freeze_moduleforarm64on anarm64host by just using thearm64version of msbuild would solve this, by e.g. just addingto
cpython/.github/workflows/reusable-windows.yml
Lines 38 to 40 in e16b12b
because then
PreferredToolArchitecture=arm64and also the arm64 version of the compiler is chosen.I think running the
_freeze_modulenatively on an arm64 host is anyway the better fit?Footnotes
noticed already in https://github.com/python/cpython/issues/153668#issuecomment-5304195008 ↩