Open federicomenaquintero opened 2 months ago
Interesting.
If it's as simple as printing those "cargo::rustc-check-cfg=cfg(has_foo)"
then sure, system-deps could easily do that.
I haven't tried doing it from build.rs, as it seemed more convenient to just copy the compiler's suggestion into Cargo.toml.
On rust nightly, librsvg is getting a lot of these:
And sure enough, per the help message and this note about automatic checking of cfgs, things work fine when I add those chunks to
Cargo.toml
.That page also suggests printing some magic info from
build.rs
as an alternative (search for "build.rs example" in it). Is this something that system-deps could do itself?