]> git.proxmox.com Git - rustc.git/blame - vendor/getrandom/build.rs
Merge tag 'debian/1.52.1+dfsg1-1_exp2' into proxmox/buster
[rustc.git] / vendor / getrandom / build.rs
CommitLineData
f20569fa
XL
1#![deny(warnings)]
2
3use std::env;
4
5fn main() {
6 let target = env::var("TARGET").expect("TARGET was not set");
7 if target.contains("-uwp-windows-") {
8 // for BCryptGenRandom
9 println!("cargo:rustc-link-lib=bcrypt");
10 } else if target.contains("windows") {
11 // for RtlGenRandom (aka SystemFunction036)
12 println!("cargo:rustc-link-lib=advapi32");
13 } else if target.contains("apple-ios") {
14 // for SecRandomCopyBytes and kSecRandomDefault
15 println!("cargo:rustc-link-lib=framework=Security");
16 }
17}