diff --git a/include/__config b/include/__config index 86413d566..3073a6d6a 100644 --- a/include/__config +++ b/include/__config @@ -59,8 +59,9 @@ #define _LIBCPP_ABI_POINTER_SAFETY_ENUM_TYPE #elif _LIBCPP_ABI_VERSION == 1 #if !defined(_WIN32) -// Enable compiling a definition of error_category() into the libc++ dylib. -#define _LIBCPP_DEPRECATED_ABI_EXTERNAL_ERROR_CATEGORY_CONSTRUCTOR +// Enable compiling copies of now inline methods into the dylib to support +// applications compiled against older libraries. +#define _LIBCPP_DEPRECATED_ABI_LEGACY_LIBRARY_DEFINITIONS_FOR_INLINE_FUNCTIONS #endif // Feature macros for disabling pre ABI v1 features. All of these options // are deprecated. diff --git a/include/memory b/include/memory index 505f7c847..1b58550bc 100644 --- a/include/memory +++ b/include/memory @@ -3750,7 +3750,8 @@ public: explicit __shared_count(long __refs = 0) _NOEXCEPT : __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; bool __release_shared() _NOEXCEPT; #else @@ -3787,7 +3788,8 @@ protected: virtual ~__shared_weak_count(); 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_weak() _NOEXCEPT; void __release_shared() _NOEXCEPT; diff --git a/include/system_error b/include/system_error index 3257ef956..a29807db0 100644 --- a/include/system_error +++ b/include/system_error @@ -385,7 +385,7 @@ public: virtual ~error_category() _NOEXCEPT; #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; #else _LIBCPP_ALWAYS_INLINE diff --git a/src/memory.cpp b/src/memory.cpp index 099f2d61c..f6f6fe8da 100644 --- a/src/memory.cpp +++ b/src/memory.cpp @@ -35,6 +35,7 @@ __shared_weak_count::~__shared_weak_count() { } +#if defined(_LIBCPP_DEPRECATED_ABI_LEGACY_LIBRARY_DEFINITIONS_FOR_INLINE_FUNCTIONS) void __shared_count::__add_shared() _NOEXCEPT { @@ -71,6 +72,8 @@ __shared_weak_count::__release_shared() _NOEXCEPT __release_weak(); } +#endif // _LIBCPP_DEPRECATED_ABI_LEGACY_LIBRARY_DEFINITIONS_FOR_INLINE_FUNCTIONS + void __shared_weak_count::__release_weak() _NOEXCEPT { diff --git a/src/system_error.cpp b/src/system_error.cpp index c54712476..94114992c 100644 --- a/src/system_error.cpp +++ b/src/system_error.cpp @@ -29,7 +29,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD // 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 { }