[clang] [clang][darwin] Default to the correct ABI when using a darwin triple (PR #245887)
Oliver Hunt via cfe-commits
cfe-commits at lists.llvm.org
Mon Nov 30 13:52:34 PST 2026
ojhunt wrote:
> Ah, okay. If this only affects direct uses of `-cc1`, then yeah, we should be able to change it.
>
> I think not having different objects is probably not tenable; we don't want to add random stuff about LLVM IR generation to an AST-level object. But what we _should_ do much more consistently is to make sure that lower-level libraries (like IRGen) treat higher-level configuration as the point of truth rather than re-deriving it. In this case, that means IRGen should use the target ABI option to actually decide what the target ABI is. This is how, say, `ObjCRuntime` selection works. That wouldn't have _prevented_ this bug, but it would hopefully have made it obvious a long time ago.
>
> Usually when we're not doing that, it's because IRGen needed a configuration option before Sema did, so it accreted its own configuration logic that never got rebased on top of the Sema option. Easy to see how that would happen.
To clarify: the ABI object I'm talking about is the clang codegen ABI object, rather than the IR ABI - I agree trying to use llvm abi objects in sema would be awful.
https://github.com/llvm/llvm-project/pull/245887
More information about the cfe-commits
mailing list