File: build.rs

package info (click to toggle)
rust-alloca 0.4.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 128 kB
  • sloc: ansic: 13; makefile: 4
file content (16 lines) | stat: -rw-r--r-- 452 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use std::env;

fn main() {
    let mut builder = cc::Build::new();
    #[cfg(feature = "stack-clash-protection")]
    builder.flag_if_supported("-fstack-clash-protection");
    (if option_env!("CC") == Some("clang") {
        builder.flag("-flto")
    } else {
        &mut builder
    })
    .file("alloca.c")
    .opt_level(2)
    .compile("calloca");
    println!("dh-cargo:deb-built-using=calloca=0={}", env::var("CARGO_MANIFEST_DIR").unwrap());
}