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

Petr Hosek via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 6 13:52:07 PST 2021


phosek added a comment.

I'd prefer to use the target triple rather than introducing a custom flag.

With dedicated flags, you might eventually end up in a similar situation as D85802 <https://reviews.llvm.org/D85802>, that is in the extreme case you might end up with `-f[no-]fuchsia-c++-abi`, `-f[no-]webassembly-c++-abi`, etc. which is not any better than `-fc++-abi=`.

With target triple, I can imagine using either `<arch>-unknown-fuchsia-itanium` or `<arch>-unknown-fuchsia-gnu`, where the former would mean targeting Fuchsia with Itanium C++ ABI while the latter would mean using GCC compatible ABI (which would imply Itanium C++ ABI). Both of these are already used by MinGW for the same purpose so there's a precedent and we don't need to invent anything new.


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