mirror of
https://github.com/rust-embedded/heapless.git
synced 2025-09-26 20:10:24 +00:00
20 lines
508 B
Rust
20 lines
508 B
Rust
#![deny(warnings)]
|
|
|
|
use std::{env, error::Error};
|
|
|
|
fn main() -> Result<(), Box<Error>> {
|
|
let target = env::var("TARGET")?;
|
|
|
|
if target.starts_with("thumbv6m-") {
|
|
println!("cargo:rustc-cfg=armv6m");
|
|
} else if target.starts_with("thumbv7m-") {
|
|
println!("cargo:rustc-cfg=armv7m");
|
|
} else if target.starts_with("thumbv7em-") {
|
|
println!("cargo:rustc-cfg=armv7m");
|
|
} else if target.starts_with("armv7r-") {
|
|
println!("cargo:rustc-cfg=armv7r");
|
|
}
|
|
|
|
Ok(())
|
|
}
|