summaryrefslogtreecommitdiffstats
path: root/third_party/rust/ntapi/build.rs
blob: bbd46f595005cc66d42ec51998aacd0d01a43e50 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use std::env::var;

fn main() {
    #[cfg(feature = "user")] {
        if var("TARGET").map(
            |t| t == "x86_64-pc-windows-gnu" || t == "i686-pc-windows-gnu"
        ).unwrap_or(false) {
            if var("WINAPI_NO_BUNDLED_LIBRARIES").is_ok() {
                println!("cargo:rustc-link-lib=ntdll");
            } else {
                println!("cargo:rustc-link-lib=winapi_ntdll");
            }
        }
    }
}