[cfe-dev] [RFC] Possible ABI break for libc++ built with -fno-rtti and -D_LIBCPP_BUILD_STATIC

Martin J. O'Riordan via cfe-dev cfe-dev at lists.llvm.org
Mon May 8 01:16:04 PDT 2017


Sounds like the perfect solution - no opportunity for error :-)

 

Thanks Eric,

 

            MartinO

 

From: Eric Fiselier [mailto:eric at efcs.ca] 
Sent: 07 May 2017 20:59
To: Martin J. O'Riordan <martin.oriordan at movidius.com>
Cc: clang developer list <cfe-dev at lists.llvm.org>; Marshall Clow <mclow.lists at gmail.com>; Duncan P. N. Exon Smith <dexonsmith at apple.com>; Ed Maste <emaste at freebsd.org>; Anton Korobeynikov <anton at korobeynikov.info>
Subject: Re: [RFC] Possible ABI break for libc++ built with -fno-rtti and -D_LIBCPP_BUILD_STATIC

 

On Sun, May 7, 2017 at 7:50 AM, Martin J. O'Riordan <martin.oriordan at movidius.com <mailto:martin.oriordan at movidius.com> > wrote:

Hi Eric,

In the email I sent on the 27th April (“[LibC++] Bug in implementation of 'std::shared_ptr'”), the problem I was seeing was:

  o  LibC++ library built with -DLIBCXX_ENABLE_RTTI=ON and -D_LIBCPP_BUILD_STATIC.

  o  User code compiled with ‘-fno-rtti -D_LIBCPP_BUILD_STATIC’.

Having ‘_LIBCPP_BUILD_STATIC’ defined by both the library builder and the library user was where it broke.  I removed ‘-D_LIBCPP_BUILD_STATIC’ from the user and it worked.  But I wasn’t building the static library with RTTI disabled because it is stated as an unsupported configuration.

So are you advising that with the proposed fix, that I should revert to defining ‘_LIBCPP_BUILD_STATIC’ as the user?

 

`_LIBCPP_BUILD_STATIC` has been removed entirely by the change. It fixes your bug by making the vtable consistent across all configurations.

 

 /Eric

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20170508/48596ece/attachment.html>


More information about the cfe-dev mailing list