[PATCH] D135326: Half-done attempt to move tail padding callback from TargetCXXABI to TargetInfo

David Blaikie via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 12 11:11:19 PDT 2022


dblaikie added a comment.

In D135326#3853324 <https://reviews.llvm.org/D135326#3853324>, @rjmccall wrote:

> In D135326#3851678 <https://reviews.llvm.org/D135326#3851678>, @dblaikie wrote:
>
>> In D135326#3851672 <https://reviews.llvm.org/D135326#3851672>, @dblaikie wrote:
>>
>>> (abandoned this, but still kind of curious)
>>>
>>> @rjmccall - any background/history of having the CXXABI distinct from the OS? I guess the point might've been that the C ABI is part of/the definition of the OS, but maybe the CXX ABI is more "floating"/flexible on top of that? Though it means these CXX ABIs don't get the benefit of being grouped with the rest of the targetOS - instead they're a bunch of switches, which seems a bit unfortunate, but I guess there's not lots of properties here, so maybe that's OK.
>>
>> I guess the other question: Is this flexibility valuable/worthwhile, or could we fold the CXXABI back into the TargetOS?
>
> I don't think we really want to support targeting an OS while independently changing the target C++ ABI, no.  But I think "OS implies C++ ABI implies ABI properties" is generally the way people define platforms, and I wouldn't want to create a situation where targets have to manually implement all of the right C++ ABI properties just to get default behavior for a specific C++ ABI or else end up weirdly divergent.  If you have a different way to achieve that goal besides composition, that's worth considering.

Thanks for the reply!

Ah, I think I see what you mean.

So we could remove the `-fc++-abi` flag? (well, it's a driver flag... - deprecate it? make it a no-op or an error if you ask for an abi that isn't the one the OS already implies?)

& then maybe ABI could be a mixin the same way TargetOS works? (TargetOS could mixin the C++ ABI, then TargetInfo mixes in TargetOS)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D135326/new/

https://reviews.llvm.org/D135326



More information about the cfe-commits mailing list