blob: 65d2398ed7319393d13d2d2b328b8445b5fbfd03 [file] [log] [blame]
Haibo Huang029e5972020-07-15 21:35:42 -07001//! This build script detects target platforms that lack proper support for
2//! atomics and sets `cfg` flags accordingly.
3
4use std::env;
5
6fn main() {
7 let target = env::var("TARGET").unwrap();
8
9 if !target.starts_with("thumbv6") {
10 println!("cargo:rustc-cfg=atomic_cas");
11 }
12
13 println!("cargo:rerun-if-changed=build.rs");
14}