Initial version
This commit is contained in:
1 parent
2cff35f215
commit
fe8e2cb5e7
360 files changed
+253989
-74
No files matched your search
@@ -0,0 +1,22 @@
|
||||
|
||||
|
||||
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");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user