mirror of
https://github.com/esp-rs/esp-hal.git
synced 2025-09-27 04:10:28 +00:00

* Move macros to new crate * Generate a single file * Pre-generate esp-metadata-generated * Move saving code to xtask * Format with both rustfmt and prettyplease * Fix doc build * Unhide macros * Fix doc string * Update semver-check baseline
19 lines
600 B
Rust
19 lines
600 B
Rust
fn main() -> Result<(), String> {
|
|
if cfg!(feature = "esp32") {
|
|
match std::env::var("OPT_LEVEL") {
|
|
Ok(level) if std::env::var("CI").is_err() => {
|
|
if level != "2" && level != "3" && level != "s" {
|
|
Err(format!(
|
|
"Building esp-storage for ESP32 needs optimization level 2, 3 or s - yours is {level}. See https://github.com/esp-rs/esp-storage"
|
|
))
|
|
} else {
|
|
Ok(())
|
|
}
|
|
}
|
|
_ => Ok(()),
|
|
}
|
|
} else {
|
|
Ok(())
|
|
}
|
|
}
|