OSDN Git Service

[libc++] Make __shared_weak_count vtable consistent across all build configurations
authorEric Fiselier <eric@efcs.ca>
Tue, 20 Oct 2020 12:11:20 +0000 (08:11 -0400)
committerLouis Dionne <ldionne@apple.com>
Tue, 20 Oct 2020 12:19:43 +0000 (08:19 -0400)
commit229db3647491ed2b2706a9b9ce13a97e38be6fa0
treecdad57f7752ea80bcbe6a2c32c9c275c18f8fc9d
parent1b589f4d4db27e3fcd81fdc5abeb9407753ab790
[libc++] Make __shared_weak_count vtable consistent across all build configurations

This patch ensures that __shared_weak_count provides a consistent vtable
regardless of if RTTI is enabled or if we are targeting a static or shared
libc++ build.

This patch is technically ABI breaking, but only for a very specific
configuration that no vendor should be shipping.

Note that _LIBCPP_BUILD_STATIC is not normally defined when building
libc++.a, but instead it must be manually provided by the user or the
__config_site.

Differential Revision: https://reviews.llvm.org/D32838
libcxx/include/memory
libcxx/src/memory.cpp
libcxxabi/CMakeLists.txt