[PATCH] D85802: [clang] Add -fc++-abi= flag for specifying which C++ ABI to use

Roland McGrath via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 24 10:53:46 PDT 2022


mcgrathr added a comment.

In D85802#3879950 <https://reviews.llvm.org/D85802#3879950>, @dblaikie wrote:

> In D85802#3879888 <https://reviews.llvm.org/D85802#3879888>, @mcgrathr wrote:
>
>> In D85802#3876106 <https://reviews.llvm.org/D85802#3876106>, @dblaikie wrote:
>>
>>>> The C++ ABI is not part of the Fuchsia system ABI, nor what we call the "Fuchsia compiler ABI". Different users of C++ are free to use whatever C++ ABI they like. Only the backend ABI independent of language-specific issues is necessary to interoperate with other code on Fuchsia.
>>>
>>> Sure enough - but I'm still sort of confused by why the Fuschia Clang target/compiler needs more than one C++ ABI. What is it interoperating with? (GCC doesn't have a Fuschia target implemented, does it? So what's it mean to target the GCC C++ ABI? what is compiling the code that Fuschia is trying to interoperate with when Clang targets Fuschia with a non-default C++ ABI?)
>>
>> When we use GCC we're using the generic ELF targets. I think it's sufficient for us to tell you that indeed we do want the option of multiple C++ ABIs to select from without justifying everything about our work to a Clang reviewer before we can proceed with meeting the requirements of our system.
>
> Would the generic ELF target support in Clang be adequate to meet that requirement, then? (so Fuschia target could be the custom C++ ABI (& custom C ABI if you likee) and a generic ELF target could be used for GCC ELF compatibility) - then we wouldn't need any C++ ABI customizability?

No. All the aspects of the Fuchsia target not specific to C++ we still want done the same way when interoperating with this code.  We're quite confident that what we want is a Fuchsia target with multiple options for the C++ ABI.  If you don't want that flexibility to be available to other targets, then fine (though I think that's a poor choice, personally).  Second-guessing everything about how we're organized our system and build is not a very helpful tactic in compiler reviews.  It would be much appreciated if this review were constrained to how the compiler should work rather than what we should want to do.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D85802



More information about the cfe-commits mailing list