Haibo Huang | 029e597 | 2020-07-15 21:35:42 -0700 | [diff] [blame^] | 1 | //! This build script detects target platforms that lack proper support for |
2 | //! atomics and sets `cfg` flags accordingly. | ||||
3 | |||||
4 | use std::env; | ||||
5 | |||||
6 | fn 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 | } |