summaryrefslogtreecommitdiffstats
path: root/third_party/rust/log/build.rs
blob: 6717bf0f70151f2919b16391a7bea4602a84433e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//! This build script detects target platforms that lack proper support for
//! atomics and sets `cfg` flags accordingly.

use std::env;

fn main() {
    let target = env::var("TARGET").unwrap();

    if !target.starts_with("thumbv6") {
        println!("cargo:rustc-cfg=atomic_cas");
    }

    println!("cargo:rerun-if-changed=build.rs");
}