knurling-rs / defmt

Efficient, deferred formatting for logging on embedded systems
https://defmt.ferrous-systems.com/
Apache License 2.0
750 stars 69 forks source link

`cargo::rustc-check-cfg` breaks build for older Cargo versions #837

Closed arctic-alpaca closed 1 month ago

arctic-alpaca commented 1 month ago

Hi,

this commit added cfg checking via cargo::rustc-check-cfg. Older versions of Cargo will fail with the following error:

error: unsupported output in build script of `defmt v0.3.7`: `cargo::rustc-check-cfg=cfg(c_variadic)`
Found a `cargo::key=value` build directive which is reserved for future use.
Either change the directive to `cargo:key=value` syntax (note the single `:`) or upgrade your version of Rust.
See https://doc.rust-lang.org/cargo/reference/build-scripts.html#outputs-of-the-build-script for more information about build script outputs.

Changing this to cargo:rustc-check-cfg fixes the issue.