Add ABI option to remove recently inlined __shared_count functions from the library.
In order to allow inlining of previously out-of-line functions without an ABI break libc++ provides legacy definitions in the dylib that old programs can continue to use. Unfortunatly Windows link.exe detects this hack and diagnoses the duplicate definitions. This patch disable the duplicate definitions on Windows by adding an ABI option which disables all "legacy out-of-line symbols" git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@292190 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -59,8 +59,9 @@
|
|||||||
#define _LIBCPP_ABI_POINTER_SAFETY_ENUM_TYPE
|
#define _LIBCPP_ABI_POINTER_SAFETY_ENUM_TYPE
|
||||||
#elif _LIBCPP_ABI_VERSION == 1
|
#elif _LIBCPP_ABI_VERSION == 1
|
||||||
#if !defined(_WIN32)
|
#if !defined(_WIN32)
|
||||||
// Enable compiling a definition of error_category() into the libc++ dylib.
|
// Enable compiling copies of now inline methods into the dylib to support
|
||||||
#define _LIBCPP_DEPRECATED_ABI_EXTERNAL_ERROR_CATEGORY_CONSTRUCTOR
|
// applications compiled against older libraries.
|
||||||
|
#define _LIBCPP_DEPRECATED_ABI_LEGACY_LIBRARY_DEFINITIONS_FOR_INLINE_FUNCTIONS
|
||||||
#endif
|
#endif
|
||||||
// Feature macros for disabling pre ABI v1 features. All of these options
|
// Feature macros for disabling pre ABI v1 features. All of these options
|
||||||
// are deprecated.
|
// are deprecated.
|
||||||
|
|||||||
@@ -3750,7 +3750,8 @@ public:
|
|||||||
explicit __shared_count(long __refs = 0) _NOEXCEPT
|
explicit __shared_count(long __refs = 0) _NOEXCEPT
|
||||||
: __shared_owners_(__refs) {}
|
: __shared_owners_(__refs) {}
|
||||||
|
|
||||||
#ifdef _LIBCPP_BUILDING_MEMORY
|
#if defined(_LIBCPP_BUILDING_MEMORY) && \
|
||||||
|
defined(_LIBCPP_DEPRECATED_ABI_LEGACY_LIBRARY_DEFINITIONS_FOR_INLINE_FUNCTIONS)
|
||||||
void __add_shared() _NOEXCEPT;
|
void __add_shared() _NOEXCEPT;
|
||||||
bool __release_shared() _NOEXCEPT;
|
bool __release_shared() _NOEXCEPT;
|
||||||
#else
|
#else
|
||||||
@@ -3787,7 +3788,8 @@ protected:
|
|||||||
virtual ~__shared_weak_count();
|
virtual ~__shared_weak_count();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
#ifdef _LIBCPP_BUILDING_MEMORY
|
#if defined(_LIBCPP_BUILDING_MEMORY) && \
|
||||||
|
defined(_LIBCPP_DEPRECATED_ABI_LEGACY_LIBRARY_DEFINITIONS_FOR_INLINE_FUNCTIONS)
|
||||||
void __add_shared() _NOEXCEPT;
|
void __add_shared() _NOEXCEPT;
|
||||||
void __add_weak() _NOEXCEPT;
|
void __add_weak() _NOEXCEPT;
|
||||||
void __release_shared() _NOEXCEPT;
|
void __release_shared() _NOEXCEPT;
|
||||||
|
|||||||
@@ -385,7 +385,7 @@ public:
|
|||||||
virtual ~error_category() _NOEXCEPT;
|
virtual ~error_category() _NOEXCEPT;
|
||||||
|
|
||||||
#if defined(_LIBCPP_BUILDING_SYSTEM_ERROR) && \
|
#if defined(_LIBCPP_BUILDING_SYSTEM_ERROR) && \
|
||||||
defined(_LIBCPP_DEPRECATED_ABI_EXTERNAL_ERROR_CATEGORY_CONSTRUCTOR)
|
defined(_LIBCPP_DEPRECATED_ABI_LEGACY_LIBRARY_DEFINITIONS_FOR_INLINE_FUNCTIONS)
|
||||||
error_category() _NOEXCEPT;
|
error_category() _NOEXCEPT;
|
||||||
#else
|
#else
|
||||||
_LIBCPP_ALWAYS_INLINE
|
_LIBCPP_ALWAYS_INLINE
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ __shared_weak_count::~__shared_weak_count()
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(_LIBCPP_DEPRECATED_ABI_LEGACY_LIBRARY_DEFINITIONS_FOR_INLINE_FUNCTIONS)
|
||||||
void
|
void
|
||||||
__shared_count::__add_shared() _NOEXCEPT
|
__shared_count::__add_shared() _NOEXCEPT
|
||||||
{
|
{
|
||||||
@@ -71,6 +72,8 @@ __shared_weak_count::__release_shared() _NOEXCEPT
|
|||||||
__release_weak();
|
__release_weak();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif // _LIBCPP_DEPRECATED_ABI_LEGACY_LIBRARY_DEFINITIONS_FOR_INLINE_FUNCTIONS
|
||||||
|
|
||||||
void
|
void
|
||||||
__shared_weak_count::__release_weak() _NOEXCEPT
|
__shared_weak_count::__release_weak() _NOEXCEPT
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
|
|||||||
|
|
||||||
// class error_category
|
// class error_category
|
||||||
|
|
||||||
#if defined(_LIBCPP_DEPRECATED_ABI_EXTERNAL_ERROR_CATEGORY_CONSTRUCTOR)
|
#if defined(_LIBCPP_DEPRECATED_ABI_LEGACY_LIBRARY_DEFINITIONS_FOR_INLINE_FUNCTIONS)
|
||||||
error_category::error_category() _NOEXCEPT
|
error_category::error_category() _NOEXCEPT
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user