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

Duncan P. N. Exon Smith via cfe-dev cfe-dev at lists.llvm.org
Wed May 3 16:53:46 PDT 2017


SGTM.

> On 2017-May-03, at 16:42, Eric Fiselier <eric at efcs.ca> wrote:
> 
> Hi All,
> 
> Libc++ currently has an ABI incompatibility when built as a static library with no RTTI. Specifically some std::shared_ptr internals have different vtable layouts in this configuration.
> 
> I would like to fix this by making the vtable definition consistent across all configurations, but that requires breaking the ABI of a very rare configuration of libc++. I suspect all users of this configuration can take the ABI break immediately, but I would like to confirm this before proceeding.
> 
> The configuration in question is a static libc++ library built with -DLIBCXX_ENABLE_RTTI=OFF and -D_LIBCPP_BUILD_STATIC,
> 
> Is anybody using this configuration and can't take an ABI break?
> 
> Note that `_LIBCPP_BUILD_STATIC` must be manually defined by the user at both when building and using libc++, and it is not supported by the CMake build system. This should mean that almost nobody is defining it.
> 
> The proposed changes can be found here: https://reviews.llvm.org/D32838 <https://reviews.llvm.org/D32838>
> 
> /Eric
> 
> 
> 

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


More information about the cfe-dev mailing list