From 2009cecfd952715292e5d07b5d96cb1660a74241 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Quentin?= Date: Wed, 27 Nov 2024 14:38:56 +0100 Subject: [PATCH] Warn if opt-level is `0` or `1` --- esp-hal/build.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/esp-hal/build.rs b/esp-hal/build.rs index 68a16186b3..8e283f1c47 100644 --- a/esp-hal/build.rs +++ b/esp-hal/build.rs @@ -14,7 +14,7 @@ use esp_metadata::{Chip, Config}; fn main() -> Result<(), Box> { println!("cargo:rustc-check-cfg=cfg(is_debug_build)"); if let Ok(level) = std::env::var("OPT_LEVEL") { - if level != "2" && level != "3" { + if level == "0" || level == "1" { println!("cargo:rustc-cfg=is_debug_build"); } }