Re: [PATCH v3] rust: Kbuild: Skip -fmin-function-alignment in bindgen flags

From: Miguel Ojeda
Date: Thu Aug 08 2024 - 11:08:15 EST


On Wed, Aug 7, 2024 at 12:57 PM Gary Guo <gary@xxxxxxxxxxx> wrote:
>
> This patch itself looks fine to me, so
>
> Reviewed-by: Gary Guo <gary@xxxxxxxxxxx>
>
> We use -fmin-function-alignment for GCC and use -falign-functions for
> clang. These options affect codegen only so it's fine to ignore them
> for bindgen.

Thanks Gary.

> Although it appears to me that we currently don't set function
> alignments for Rust codegen. Maybe that's worth considering adding?

Yeah, agreed. I think currently there is no way for that in `rustc`
(apart from `fn_align`) -- I have created an issue about it and a few
others and linked them all at
https://github.com/Rust-for-Linux/linux/issues/355.

Cheers,
Miguel