Re: [PATCH] rust: cfi: disable function merging if CFI is enabled
From: Miguel Ojeda
Date: Fri Aug 21 2026 - 05:23:24 EST
On Fri, Aug 21, 2026 at 1:43 AM Sami Tolvanen <samitolvanen@xxxxxxxxxx> wrote:
>
> The LLVM fix itself is trivial, and it looks like a pull request for
> it already exists. I assume we'll want to drop this flag for fixed
> LLVM versions when they're available.
I will link it in the commit message when I pick it up soon -- already
did in https://github.com/Rust-for-Linux/linux/issues/1132.
I also added the `-Z` flag to https://github.com/Rust-for-Linux/linux/issues/2.
The `-Zmerge-functions` flag is internal but has been there since Rust
1.34.0 in upstream commit:
b91d211b4030 ("Add a target option "merge-functions" taking values
in ("disabled", "trampolines", or "aliases (the default)) to allow
targets to opt out of the MergeFunctions LLVM pass. Also add a
corresponding -Z option with the same name and values.")
so that should be fine, but I will ping upstream Rust so that they are
aware we are using it.
And, yeah, agreed, we probably should remove the flag conditionally
later on, to confirm the bug is gone etc.
Cheers,
Miguel