Skip to content

Windows arm64 support - #328

Open
knightmare2600 wants to merge 6 commits into
saltstack:mainfrom
knightmare2600:windows-arm64-support
Open

Windows arm64 support#328
knightmare2600 wants to merge 6 commits into
saltstack:mainfrom
knightmare2600:windows-arm64-support

Conversation

@knightmare2600

Copy link
Copy Markdown

Windows arm64 support

Resubmission of #318, which was accidentally auto-closed when my fork was deleted and has since been recloned. Same branch, same commits — nothing has changed content-wise, this is purely to restore the PR after the fork mishap.

Please See #318 for the original discussion and review context. CC:@dwoz

relenv/build/windows.py already carried arm64 plumbing (OpenSSL
VC-WIN64-ARM target, arch_to_plat/arch_to_archname mappings) that was
never reachable because arches[WIN32] had arm64 commented out since
2022, pending "Python 11" support that has long since landed. Uncomment
it so relenv build/create/fetch accept --arch arm64 on Windows.

Add build_windows_arm64 and test_windows_arm64 jobs targeting the
windows-11-arm hosted runner (native host==target, unlike the existing
x86 job which cross-builds on windows-2022), plus an explicit VS
ARM64 VC++ tools install step since install_vc_build.ps1 only ever
requests the x86/x64 workload.

Untested pending an actual CI run. Tracks
saltstack#280.
MSFT_VSInstance (root/cimv2/vs) isn't registered on the windows-11-arm
runner image even though VS 2022 Enterprise ships pre-installed there.
The CI run against build_windows_arm64 confirmed this in practice: the
script reported VS as "Missing" and spent 50+ minutes downloading and
laying out a VS 2017 build-tools bundle instead of using the VS 2022
already on the box. Fall back to vswhere.exe -- present on every
GitHub-hosted Windows image regardless of CIM provider support -- before
concluding VS needs a from-scratch install.
setup-python has no arm64 Windows build for 3.10 ("The version '3.10'
with architecture 'arm64' was not found for Windows Enterprise") --
CPython's official arm64 Windows installers only started at 3.11. All
5 build_windows_arm64 jobs succeeded in the prior run (confirming the
native ARM64 CPython+OpenSSL build itself works); this only fixes the
verify job's own bootstrap interpreter, matching what
build_windows_arm64 already uses.
test_pip_install_cryptography and test_pip_install_idem failed on the
windows arm64 build: pip fell back to compiling cryptography from
source (no win_arm64 wheel exists yet -- nothing has ever shipped one
for this target before), and openssl-sys couldn't find an OpenSSL to
link against (OPENSSL_DIR unset, no vcpkg). relenv already builds
OpenSSL from source for arm64 (update_openssl's VC-WIN64-ARM path);
copy that install tree into the onedir as OpenSSL/ and archive it, then
point OPENSSL_DIR at it in the two affected tests. No-op on every
platform where OpenSSL comes from prebuilt binaries (prefix is never
populated there) or where a wheel already exists.
Was added purely to dispatch CI runs manually while testing this
branch without needing a PR. Not part of adding windows arm64 support;
drop it to keep the change focused.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants