Re: [PATCH v4 3/4] rust: add a Kconfig function to test for support of bindgen options
From: Miguel Ojeda
Date: Sun Nov 23 2025 - 20:48:45 EST
On Mon, Nov 24, 2025 at 1:23 AM Asuna Yang <spriteovo@xxxxxxxxx> wrote:
>
> Use the `BINDGEN_EXTRA_CLANG_ARGS` environment variable to pass the
> `--target` option for cross compiling, so that the function can be used
> to test both bindgen options and bindgen backend options.
It seems this explains part of how it works, but not what the commit
adds and why, i.e. could we start with "Add `rustc-bindgen-option`..."
etc.?
By the way, shouldn't this just be called `bindgen-option`? Up to the
Kbuild team.
More importantly, should we just have a separate function for backend
flags? That would be easier and would avoid having to use the
environment variable, if I understand the commit message here
correctly. And, anyway, it is actually the only function we need so
far.
> +# Return y if the Rust bindgen supports <flag>, n otherwise
Maybe just "y if bindgen supports"?
Thanks!
Cheers,
Miguel