File: build.rs

package info (click to toggle)
rust-getrandom 0.4.1-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 408 kB
  • sloc: makefile: 2
file content (11 lines) | stat: -rw-r--r-- 446 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
//! Build script for memory sanitization support

fn main() {
    // Automatically detect cfg(sanitize = "memory") even if cfg(sanitize) isn't
    // supported. Build scripts get cfg() info, even if the cfg is unstable.
    println!("cargo:rerun-if-changed=build.rs");
    let sanitizers = std::env::var("CARGO_CFG_SANITIZE").unwrap_or_default();
    if sanitizers.contains("memory") {
        println!("cargo:rustc-cfg=getrandom_msan");
    }
}