Files
EonaCat.XSBox/crates/engine/build.rs
T
EonaCat 1b0d534e6c
Rust validation / Windows x64 build and tests (push) Waiting to run
Rust validation / Formatting (push) Failing after 27s
EonaCat/ci-workflows: SonarQube / sonar (push) Successful in 47s
Initial
2026-12-04 21:03:25 +01:00

22 lines
960 B
Rust

fn main() {
match std::env::var("CARGO_CFG_TARGET_ENV").as_deref() {
Ok("msvc") => {
println!("cargo:rustc-link-arg-bins=/HIGHENTROPYVA:NO");
println!("cargo:rustc-link-arg-bins=/EXPORT:D3D12SDKVersion,DATA");
println!("cargo:rustc-link-arg-bins=/EXPORT:D3D12SDKPath,DATA");
println!("cargo:rustc-link-arg-bins=/DELAYLOAD:d3d12.dll");
println!("cargo:rustc-link-arg-bins=delayimp.lib");
}
_ => {
let out = std::env::var("OUT_DIR").expect("cargo sets OUT_DIR");
let def = std::path::Path::new(&out).join("eonacat-xs-exports.def");
std::fs::write(&def, "EXPORTS\nD3D12SDKVersion DATA\nD3D12SDKPath DATA\n")
.expect("the .def is written into OUT_DIR");
println!("cargo:rustc-link-arg-bins={}", def.display());
println!("cargo:rustc-link-arg-bins=-Wl,--disable-high-entropy-va");
}
}
}