On Sat, Nov 8, 2025 at 2:44 AM Miguel Ojeda <[email protected]> wrote:
>
> note that `CLIPPY=1` does not reproduce it
And obviously this means we have to special case this one too...
$(obj)/bindings.o: private skip_gendwarfksyms := $(if $(call
rustc-min-version,109100),$(if $(KBUILD_CLIPPY),,1))
There may be other cases that disable the optimization or similar,
plus we may have other small crates in the future that could also
suffer from this, so it may be best to simply force to generate the
DWARF with a dummy symbol from that crate for the time being as the
fix:
#[expect(unused)]
static DUMMY_SYMBOL_FOR_DWARF_DEBUGINFO_GENERATION_FOR_GENDWARFKSYMS:
() = ();
With `#[no_mangle]` may be more reliable and it also gives an actual
exported symbol.
And then later do something in the `cmd` command itself or teaching
`genkallksyms` to auto-skip in cases like this.
What do you think?
Cheers,
Miguel