build(victory): export D3D12SDKVersion and D3D12SDKPath from GNU targets #97
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: launcher
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
run report
security: hold
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs gpu test
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Androtim--MiniVI!97
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/97/head"
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?
@Androtim on GitHub · 2026-11-29 09:54 UTC · original
Androtim:feat/iter98-gnu-d3d12sdk-exports→main· +25 −5 · 1 files · 1 commits · merged 2026-11-29 14:05 UTCSummary
Adapted from upstream
VIctory-NVIDIA(6cb1894f, GPL-3.0), rebased cleanly ontoorigin/main(c92aa44) with zero overlap against any open PR:apps/victory/build.rs): Returns early whenCARGO_CFG_TARGET_OS != windowsso Linux/macOS targets (gnuor empty env) never pass a.deffile to ELF/Mach-O linkers.apps/victory/build.rs): Previouslybuild.rsonly emitted/EXPORT:D3D12SDKVersion,DATAand/EXPORT:D3D12SDKPath,DATAundermsvc, leavingx86_64-pc-windows-gnubinaries with an empty.edataexport directory (00000000). Writingvictory-exports.def(EXPORTSwithD3D12SDKVersion DATAandD3D12SDKPath DATA) intoOUT_DIRand passing it viacargo:rustc-link-arg-binspopulates.edataon Windows GNU toolchains as well and protects those statics from--gc-sections.Verification
cargo xtask policy:asset policy: 303 files okcargo test -p victory --bin victory --locked: 28 passed; 0 failedcargo clippy --workspace --all-targets --locked -- -D warnings: 0 warningscargo clippy --workspace --all-targets --features diagnostics --locked -- -D warnings: 0 warningscargo build --release --bin victory --locked+objdump -p:Export Directory [.edata]: populated (0x00ee8000) with[0] D3D12SDKPath,[1] D3D12SDKVersion@Androtim on GitHub · 2026-11-29 10:03 UTC · original · edited 2026-11-29 13:04 UTC
Automated triage for the maintainers (not an approval).
Verdict:
merge-candidate· CI (check):passingAutomated Triage Review
Verdict:
merge-candidateSummary
apps/victory/build.rs: Cleanly adds an early return whenCARGO_CFG_TARGET_OS != "windows"(protecting ELF/Mach-O linkers), preserves the existingmsvclinker arguments (/EXPORT:D3D12SDKVersion,DATA,/EXPORT:D3D12SDKPath,DATA,/DELAYLOAD:d3d12.dll,delayimp.lib) unchanged, and for non-MSVC Windows targets (gnu/gnullvm) writesvictory-exports.defintoOUT_DIRwithD3D12SDKVersion DATAandD3D12SDKPath DATAand passes it viacargo:rustc-link-arg-bins.apps/victory/src/main.rs(D3D12SDKVersionandD3D12SDKPathare both#[cfg(windows)] #[unsafe(no_mangle)] #[used]statics) andapps/victory/Cargo.toml(singlevictorybinary target).build.rsonly reads standard Cargo env vars and writes a constant.deffile intoOUT_DIR; no external commands or unsafe operations.Non-blocking note
apps/victory/build.rsheader comment, GNU targets do not delay-loadd3d12.dll, somatch_d3d12_core()inapps/victory/src/main.rscannot adjustD3D12SDKVersionbefored3d12.dllis loaded (GNU builds will always advertise the initial614value). That is a reasonable documented trade-off compared to exporting nothing on GNU targets, and MSVC builds are unaffected.Note: This is an automated triage review, not formal maintainer approval.
Generated with Antigravity CLI (
agy).@Androtim on GitHub · 2026-11-29 10:22 UTC · original
Addressed the
minivi-triagefeedback at12f546d(rebased ontoorigin/mainc92aa44):apps/victory/build.rswhenCARGO_CFG_TARGET_OS != windows, so non-Windows targets (gnuor empty env on Linux/macOS) never receive.deflinker flags.Re-verified locally & on CI:
cargo xtask policy:asset policy: 303 files okcargo test -p victory --bin victory --locked: 28 passed; 0 failedcargo clippy --workspace --all-targets --locked -- -D warnings&--features diagnostics: 0 warningscargo build --release --bin victory --locked+objdump -p:.edataexports[0] D3D12SDKPathand[1] D3D12SDKVersioncleanly on Windows GNU, with standard Windows system DLLs only.check: SUCCESS (https://github.com/Androtim/MiniVI/actions/runs/46251132331)