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

From: Miguel Ojeda
Date: Wed Jul 31 2024 - 06:19:21 EST


On Wed, Jul 31, 2024 at 5:41 AM Zehui Xu <zehuixu@xxxxxxxxxx> wrote:
>
> In addition, since -falign-functions is not used when
> -fmin-function-alignment is available but skipped and libclang
> supports -falign-functions, this patch adds it back to the
> bindgen_extra_c_flags to ensure the intended function alignment
> is maintained.

Does it change the ABI or could change `bindgen`'s output in a way we care?

If we do need it, then I think passing `-falign-functions` makes
sense, since it is the only one that Clang supports and has the same
behavior as `-fmin-function-alignment` in GCC (i.e. applies it to all
functions).

If not, then it may be best to avoid unneeded complexity.

Thanks!

Cheers,
Miguel