Files
rust/library/stdarch/crates/assert-instr-macro/build.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

13 lines
306 B
Rust
Raw Normal View History

use std::env;
fn main() {
let opt_level = env::var("OPT_LEVEL")
.ok()
.and_then(|s| s.parse().ok())
.unwrap_or(0);
2020-11-01 19:53:39 -05:00
let profile = env::var("PROFILE").unwrap_or_default();
if profile == "release" || opt_level >= 2 {
println!("cargo:rustc-cfg=optimized");
}
}