[cfe-dev] [RFC][Clang] Flag for Switching between C++ ABIs

Roland McGrath via cfe-dev cfe-dev at lists.llvm.org
Thu Aug 6 10:55:00 PDT 2020


The feature we are proposing is entirely about the C++ ABI, which is wholly
an issue in the front end.  The "C ABI" is really the target-specific
language-independent ABI underlying all language front ends.  There are
various switches that affect that already and having a more straightforward
one to collect various ABI concerns might be a worthwhile feature.  But I
think that is entirely orthogonal to the C++-specific issues we are
discussing here.

On Thu, Aug 6, 2020 at 12:35 AM Chris Hanson <cmh at mac.com> wrote:

> On Aug 5, 2020, at 4:11 PM, Leonard Chan via cfe-dev <
> cfe-dev at lists.llvm.org> wrote:
>
>
> The flag would look something like `-fc++-abi=` and override the default
> C++ ABI selected by the target. It's up to the user to make sure that the
> ABI and target combination makes sense.
>
>
> I like this idea and I know people in the retrocomputing and alt-OS
> community would find it useful. (Example: Haiku binary compatibility with
> BeOS is currently implemented by using a very old GCC. This would allow
> easier experimentation with implementing a compatible ABI in a modern
> compiler.)
>
> Should it be specific to the C++ ABI though? Or should there be an
> equivalent for C ABI? (Example: The LLVM 68000 back-end that's in progress
> currently targets the SVR4 ABI, but users of the compiler will definitely
> want support for Amiga, Atari, classic Mac OS, Sun, HP, etc. ABIs.) I
> suppose for C this is implied by the target triple, but it might be useful
> to have a separate switch for it.
>
>   -- Chris
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20200806/3bbf69d5/attachment.html>


More information about the cfe-dev mailing list