mirror of
https://github.com/MSxDOS/ntapi
synced 2026-06-08 11:37:18 +00:00
Allow linking to system ntdll (#4)
* Allow linking to system ntdll * Use imported `var`
This commit is contained in:
@@ -1,9 +1,15 @@
|
||||
use std::env::var;
|
||||
|
||||
fn main() {
|
||||
#[cfg(feature = "user")] {
|
||||
if std::env::var("TARGET").map(
|
||||
if var("TARGET").map(
|
||||
|t| t == "x86_64-pc-windows-gnu" || t == "i686-pc-windows-gnu"
|
||||
).unwrap_or(false) {
|
||||
println!("cargo:rustc-link-lib=winapi_ntdll");
|
||||
if var("WINAPI_NO_BUNDLED_LIBRARIES").is_ok() {
|
||||
println!("cargo:rustc-link-lib=ntdll");
|
||||
} else {
|
||||
println!("cargo:rustc-link-lib=winapi_ntdll");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user