[PATCH] D93668: [clang] Add -ffuchsia-c++-abi flag to explicitly use the Fuchsia C++ ABI

Reid Kleckner via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 8 11:05:24 PST 2021


rnk added a comment.

In D93668#2485719 <https://reviews.llvm.org/D93668#2485719>, @mcgrathr wrote:

> It's fine to have a target tuple translate to a default C++ ABI.
> But the C++ ABI selection is fundamentally not a target flavor thing.  It's just a C++ ABI thing.
> So using the target tuple as the sole mechanism to determine C++ ABI is fundamentally wrong.

Generally speaking, the C++ ABI corresponds to the target tuple. I don't want to give the user separate control of the C++ ABI without a compelling use case. If a command line flag is available, users will set it, they will request the AArch64 or Microsoft C++ ABI on x64, they will create a novel, never-before-previously-tested configuration, and when it doesn't work, they will file bugs about it. I aim to head that off at the pass. The two compelling use cases that I've heard of so far are:

1. vanilla Itanium C++ ABI code on Fuchsia
2. targeting fuchsia using wasm, some Fuchsia C++ ABI features may be needed

I think both of those cases can be handled with target tuples: *-*-fuchsia-itanium or webassembly-*-fuchsia
Do you think we need another way of expressing this?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D93668



More information about the cfe-commits mailing list