Loader tests: run the delay-load probe with LLVM-MinGW and Wine #2682
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2684"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from Marvisak/VIctory. Originally posted by SinisterRob on 2026-11-25T18:08:01Z.
The loader probe builds a synthetic title with normal and delay-load imports. The fixture uses the MSVC linker spelling for delay loading, so an LLVM-MinGW cross-build cannot link it. The test also invokes the host's Cargo from inside the test process, which cannot start Linux Cargo under Wine.
Use the LLVM-MinGW linker's delay-load spelling on the LLVM Windows GNU target. For Wine, accept a prebuilt fixture via
VICTORY_HLE_PROBE, the same hook as #1218. Native MSVC tests still build the fixture on demand.On Linux with Rust 1.98.1, LLVM-MinGW and Wine 11.22, I built the fixture and test binaries for
x86_64-pc-windows-gnullvm, then ran all four loader test binaries. 38 passed, 0 failed. This includes ordinary and delay-loaded imports, title DLL binding and thread notifications. The fixture is entirely synthetic. AI-assisted.Imported from Marvisak/VIctory. Originally posted by kotekompotek on 2026-11-25T18:38:03Z.
Both parts are right: CARGO_CFG_TARGET_ABI llvm is the correct discriminator for the MinGW delay-load spelling (lld takes --delayload, MSVC /DELAYLOAD), and reusing the VICTORY_HLE_PROBE prebuilt hook keeps Wine runners out of the nested-cargo problem.
Imported from Marvisak/VIctory. Originally posted by fuzeofficlal on 2026-11-25T19:19:46Z.
Independent Windows 11 MSVC verification and review of
9e539d84(on13f91ca):Verification (
rustc 1.98.1MSVC)cargo clippy --locked -p victory-loader --all-targets -- -D warnings: 0 warnings.cargo test --locked -p victory-loader: 34 passed (lib),crash_log(1),load_probe(2),title_dlls(1), 0 failed — confirms native MSVC/DELAYLOADprobe build and execution are unchanged.Review Notes
tests/fixtures/hle-probe/build.rsonCARGO_CFG_TARGET_ABI == "llvm"cleanly keeps MSVC/DELAYLOAD:intact while enabling LLVM-MinGW-Wl,--delayload=, andVICTORY_HLE_PROBEcleanly bypasses nestedcargoinvocation under Wine.triage: merge candidate) also modifiescrates/victory-loader/tests/load_probe.rsandtests/fixtures/hle-probe/build.rs(usingVICTORY_HLE_PROBE_DLL), so the two PRs will overlap there if both land.Imported from Marvisak/VIctory. Originally posted by Kajanos on 2026-11-25T20:43:26Z.
Linux / Wine run of the prebuilt-probe path, head
9e539d8487merged ontomain13f91caee2.Setup: Linux (Gentoo) / wine-proton 11.0.3, RTX 5080; cross-built with cargo-xwin for
x86_64-pc-windows-msvc, rustc 1.98.1.main,loads_binds_and_calls_probefails under Wine withrunning cargo: Os { code: 6, ... "Invalid handle." }because the test can't start cargo from inside Wine.VICTORY_HLE_PROBEset, it fails the same way, as expected.cargo xwin build --target x86_64-pc-windows-msvc --manifest-path tests/fixtures/hle-probe/Cargo.tomland setVICTORY_HLE_PROBE=Z:\...\hle_probe.dll. Theload_probetest binary then passes 2/2 under Wine.Not run: the LLVM-MinGW (
-Wl,--delayload) branch ofbuild.rs. I only built the fixture with MSVC (/DELAYLOAD). Not run on Windows.AI-assisted (Claude Code)
Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T22:17:29Z.
Automated triage for the maintainers.
Needs work; needs the maintainer's decision. The change is small and reads correctly:
tests/fixtures/hle-probe/build.rspicks-Wl,--delayload=on the LLVM ABI and keeps/DELAYLOAD:otherwise, andbuild_probeincrates/victory-loader/tests/load_probe.rstakes a prebuilt fixture fromVICTORY_HLE_PROBE. Two things stop it from being a plain merge candidate:build.rs(the fixture's linker arguments) to support a Linux/LLVM-MinGW/Wine test setup. Build-script changes and whether that setup is a supported target are the maintainer's call.VICTORY_HLE_PROBE_DLL, already triaged as a merge candidate), which edits the same two files. Two env-var names for the same hook should not both land. Rebasing onto whichever lands first, or reducing this PR to the delay-load spelling only, would settle it.CI:
checkpassing on this head.Generated by Claude Code
Pull request closed