[clang] [clang] Add -mlarge-eh-encoding driver flag (PR #187583)
Farid Zakaria via cfe-commits
cfe-commits at lists.llvm.org
Tue Jul 14 21:14:20 PDT 2026
fzakaria wrote:
> I'd rather not promote this to a stable driver flag. -mllvm options carry no compatibility guarantee, which is what you want while the design isn't settled. Compiler drivers maintain a high stability and it's hard to walk back. We also haven't settled on a large-code-model strategy overall; this flag could end up the wrong shape. And the realistic users here (Meta and maybe Google; >2GB .text, near-head builds, centrally controlled toolchains) already tolerate -mllvm fine, so the driver-level convenience is thin.
@MaskRay can you recommend a change I can upstream to make this usable from Clang .
What I discovered was that the `-mllvm` options aren't registered in Clang which is why I needed to expose this.
(There is no wiring of RegisterMCTargetOptionsFlags in Clang today.)
Should I pursue resolving that gap and exposing all of them?
It's not so simple as merely exposing them since many of those flags in that struct are already exposed as -m flags on Clang so they would be duplicated?
That's why I settled on this approach but I'm happy & willing to take your guidance here.
I just need to make the new feature toggle-able :)
https://github.com/llvm/llvm-project/pull/187583
More information about the cfe-commits
mailing list