Repository navigation
fix(msvc): validate native Windows runtime and C ABI - #668
Merged
Merged
Conversation
Signed-off-by: LunaStev <[email protected]>
Resolve target-matched LLVM 21 builtins alongside the selected MSVC CRT and add hosted startup, wide arithmetic, and negative-link fixtures. Preserve explicit no-default-library linking. Refs wavefnd#617. Signed-off-by: LunaStev <[email protected]>
Add independent C and Wave checks with native machine validation, both optimization and CRT modes, and retained execution evidence. Share the driver and fixtures between x64 and ARM64 Windows. Refs wavefnd#615, wavefnd#616, wavefnd#617. Signed-off-by: LunaStev <[email protected]>
Classify homogeneous floating aggregates before the indirect-size rule and use ordinary composite transport for named aggregates in Windows variadic functions. Verify both MSVC targets against Clang IR and feature-isolated compilation. Refs wavefnd#616. Signed-off-by: LunaStev <[email protected]>
This was referenced Sep 18, 2026
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add required native Windows x64 and ARM64 execution gates for MSVC hosted programs and bidirectional C/Wave ABI calls. Fix the ARM64 aggregate classification and runtime/archive handling needed to run those gates against the real Microsoft SDK and CRT.
The change is split into four commits:
Fixes #615
Fixes #616
Fixes #617
Related migration tracker: #611.
Motivation
MSVC hosts were running executable regressions through the public GNU default, while valid SDK archives could be rejected before linking. Hosted wide arithmetic also needs the matching LLVM compiler-rt builtins. On ARM64, four-double homogeneous aggregates were classified as indirect before HFA classification, and named HFA arguments in Windows variadic functions used the wrong transport.
The new native gate checks independent results in both C-to-Wave and Wave-to-C calls. Missing tools, wrong machine types, emulation, link failures, and execution failures fail the gate instead of reporting a skipped success.
Target and compatibility impact
/WHOLEARCHIVEremain rejected./NODEFAULTLIBbehavior is preserved, and missing-helper diagnostics explain the required LLVM location.std/libc bindings or license-boundary changes. Release packaging work in Stage native MSVC release packages for amd64 and ARM64 without MinGW runtimes #621 and final cutover in Remove Windows GNU and MinGW support after the MSVC release gates pass #626 remain separate.Validation
Passed locally:
cargo test --locked --workspace --all-targets --no-default-features --features llvm-target-core64 --jobs 2: 203 tests across 29 suites, no failed or ignored tests.cargo clippy --locked --workspace --all-targets --no-default-features --features llvm-target-core64 --jobs 2 -- -D warnings.cargo fmt --all --checkandrustfmt --check tools/check_msvc_inputs.rs.cargo test --locked --no-default-features --features llvm-target-aarch64 --jobs 2 --test codegen_regressions msvc_native_fixtures_compile_and_arm64_hfas_match_clang.git diff --check.Native Windows x64 and ARM64 execution is still required in this PR's CI before merging. Wine execution, QEMU AAPCS64 execution, and ARM64 PE cross-linking are supporting checks, not native Windows evidence. The required CI gate runs 25 scenarios per architecture covering startup, arithmetic helpers, bidirectional ABI calls, custom entry, and negative linking. It retains source snapshots, IR, objects, executables, tool versions, commands, output, and exit status.
Checklist
Signed-off-byline.std/.