[cfe-dev] Does clang now emit [abi:cxx11] unconditionally when used with libstdc++?

Renato Golin via cfe-dev cfe-dev at lists.llvm.org
Wed Aug 17 05:16:43 PDT 2016


On 16 August 2016 at 19:41, Maria Gottschalk via cfe-dev
<cfe-dev at lists.llvm.org> wrote:
> If major version < 5: never emit abi tags.
> If major version >=5: emit abi tags if requested with __attribute ((__abi_tag__ ("..."))).

I don't think that's appropriate, as that would change the behaviour
based on the library's version, not its source code.

If the source has abi tags, and we support abi tags, we *must* emit
abi tags in the mangling.


> This on the assumption that there is something to fix. Richard said there isn't. I wouldn't know.

The new c++11 functions were added to support the new abi, so old abi
library consumers would never hit them, making this "not a problem".

If library consumers do hit them, than they're aware of the problem
and intend to, in which case, exposing it is only logical.

This looks like a behavioural problem, not a compiler problem, so
fixing it in the compiler is a bad move.

If you don't want abi tags support, stick to Clang 3.8.

If you want Clang 3.9+ without abi tag support, revert the two patches
and use that. Of course, any bug in that toolchain would have to be
reproduced in an upstream release to be considered.

cheers,
--renato


More information about the cfe-dev mailing list