feat: Add Windows ARM64 (aarch64-pc-windows-msvc) build support#42312
feat: Add Windows ARM64 (aarch64-pc-windows-msvc) build support#42312npiesco wants to merge 4 commits intoservo:mainfrom
Conversation
|
Might be worth contributing the glslopt fixes to the upstream. The crate seems to be maintained. |
|
Why is bumping python needed? All builds 3.11=< have windows arm64 builds per https://www.python.org/downloads/windows/. We should definitely upstream the fix for glsl. As for other changes can you do separate PR for each of them. This way we can keep thing moving and it will be easier to revert stuff if needed. |
Windows ARM64 (aarch64-pc-windows-msvc) doesn't have native profiling support in the background hang monitor. Add it to the list of platforms that use DummySampler, alongside Linux musl and other unsupported targets. Part of Windows ARM64 build support: servo#42312
std::process::Command cannot be reused after calling .output() because it consumes the command's internal state. The previous code would create a Command, test it with try_python_command(), and then try to return the same Command - but by then the command was already consumed. This refactors try_python_command() to: 1. Take program name and args as parameters 2. Only test if the command works (returning Result<(), String>) 3. Create a FRESH Command in find_python() after confirming it works Part of Windows ARM64 build support: servo#42312
std::process::Command cannot be reused after calling .output() because it consumes the command's internal state. The previous code would create a Command, test it with try_python_command(), and then try to return the same Command - but by then the command was already consumed. This refactors try_python_command() to: 1. Take program name and args as parameters 2. Only test if the command works (returning Result<(), String>) 3. Create a FRESH Command in find_python() after confirming it works Part of Windows ARM64 build support: servo#42312 Signed-off-by: npiesco <[email protected]>
Windows ARM64 (aarch64-pc-windows-msvc) doesn't have native profiling support in the background hang monitor. Add it to the list of platforms that use DummySampler, alongside Linux musl and other unsupported targets. Part of Windows ARM64 build support: servo#42312 Signed-off-by: npiesco <[email protected]>
This commit enables Servo to build natively on Windows ARM64. Changes: - Cargo.toml: Patch glslopt to use vendored version with ARM64 fix - third_party/glslopt-patched/: Vendored glslopt-rs with float16_t renamed to mesa_float16_t to avoid conflicts with ARM NEON intrinsics in arm_fp16.h - README.md: Add Windows ARM64 to supported platforms The glslopt fix has been submitted upstream: jamienicol/glslopt-rs#11 Once merged, the vendored copy can be removed. Related PRs: - fix(build): Fix Command reuse bug in find_python() - #TBD - fix(background_hang_monitor): Use DummySampler on Windows ARM64 - #TBD Tested on Windows 11 ARM64 with: - Rust 1.91.0-aarch64-pc-windows-msvc - Python 3.11+ ARM64 via uv - LLVM 21 ARM64 - OpenSSL 3.6.1 ARM64 - MSVC 14.50.35717 Signed-off-by: npiesco <[email protected]>
Signed-off-by: npiesco <[email protected]>
You're right about Python, reverted it back to 3.11. When working on this I just used the version I had on my system already. I split out the other changes into separate PRs:
This PR now only contains glslopt vendoring for ARM64 Windows support. Upstream fix is at: https://github.com/jamienicol/glslopt-rs/pull/11 |
Windows ARM64 (aarch64-pc-windows-msvc) doesn't have native profiling support in the background hang monitor. Add it to the list of platforms that use DummySampler, alongside Linux musl and other unsupported targets. Part of Windows ARM64 build support: servo#42312 Signed-off-by: npiesco <[email protected]>
Windows ARM64 (aarch64, MSVC) does not support native profiling. PR updates platform configuration to route Windows ARM64 to DummySampler, aligning it with other unsupported targets (e.g., Linux musl) and fixing build compatibility. PR #42312 - Updates platform configuration + conditional compilation - Background hang monitor (lib.rs) now selects DummySampler on Windows ARM64 - Uses DummySampler as SamplerImpl for aarch64 Windows build/compatibility fix only. --------- Signed-off-by: npiesco <[email protected]>
Enables Servo to build natively on Windows ARM64.
Problem:
On Windows ARM64, MSVC compiler includes
<arm_fp16.h>which definestypedef __fp16 float16_t;. This conflicts withstruct float16_tin glslopt'sglsl-optimizer/src/util/half_float.h, causing compilation error.Fix:
Cargo.toml: Patch glslopt to use vendored copy with fixthird_party/glslopt-patched/: Vendored glslopt withfloat16_trenamed tomesa_float16_tUpstream: jamienicol/glslopt-rs#11 (vendored copy can be removed once merged and released.)
Prerequisite PRs:
&mut JSContextinside workersPostMessageapi #42342 - Fix Command reuse bug in find_python()Tested on Windows 11 ARM64: