Skip to content

Commit

Permalink
revert esp-config changes
Browse files Browse the repository at this point in the history
  • Loading branch information
MabezDev committed Nov 6, 2024
1 parent a1b732c commit b0c85c8
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions esp-config/src/generate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,17 +149,10 @@ fn emit_configuration(
// emit cfgs and set envs
for (name, value) in configs.into_iter() {
let cfg_name = snake_case(name.trim_start_matches(prefix));
println!("cargo:rustc-check-cfg=cfg({cfg_name})");
match value {
Value::Bool(b) => {
println!("cargo:rustc-check-cfg=cfg({cfg_name})");
if *b {
println!("cargo:rustc-cfg={cfg_name}")
}
}
Value::String(v) => {
// TODO we need to emit the other option else we'll get a lint warning...
println!("cargo:rustc-check-cfg=cfg({cfg_name}, values(\"{v}\"))");
println!("cargo:rustc-cfg={cfg_name}=\"{v}\"")
Value::Bool(true) => {
println!("cargo:rustc-cfg={cfg_name}")
}
_ => {}
}
Expand Down

0 comments on commit b0c85c8

Please sign in to comment.