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

Andrey Bokhanko via cfe-dev cfe-dev at lists.llvm.org
Mon Aug 15 11:53:30 PDT 2016

To clarify, this is obviously a compiler flag, but the macro is consumed by
the library (not compiler) and doesn't affect how gcc/clang work. Thus, if
you want old mangling, just pass this flag either to gcc or clang.


On Monday, August 15, 2016, Andrey Bokhanko <andreybokhanko at gmail.com>

> As I understand, -D_GLIBCXX_USE_CXX11_ABI is a library flag, not compiler
> one, so clang should work with libstdc++ *exactly* as gcc5+ do. See
> http://developers.redhat.com/blog/2015/02/05/gcc5-and-the-c11-abi/ for
> details.
> Yours,
> Andrey
> On Monday, August 15, 2016, Renato Golin <renato.golin at linaro.org
> <javascript:_e(%7B%7D,'cvml','renato.golin at linaro.org');>> wrote:
>> On 15 August 2016 at 15:58, Maria Gottschalk via cfe-dev
>> <cfe-dev at lists.llvm.org> wrote:
>> > So, is it correct that clang-3.9.0 unconditionally compiles for the new
>> abi? That gcc 4.x.y is no longer usable and that you must have gcc 5+ if
>> you want to use libstdc++?
>> Oh bother! Adding Dmitry, as he wrote the code [1].
>> I was under the impression that, if you didn't use the tag, nothing
>> would have changed.
>> We don't have many compile-time options like GCC, so this would have
>> to be a run-time option, if needed.
>> cheers,
>> --renato
>> [1] https://reviews.llvm.org/D18035 and https://reviews.llvm.org/D17567
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20160815/f226b061/attachment.html>

More information about the cfe-dev mailing list