Index: include/algorithm =================================================================== --- include/algorithm +++ include/algorithm @@ -3611,6 +3611,7 @@ // stable, 4-10 compares, 0-9 swaps template +_LIBCPP_HIDDEN unsigned __sort5(_ForwardIterator __x1, _ForwardIterator __x2, _ForwardIterator __x3, _ForwardIterator __x4, _ForwardIterator __x5, _Compare __c) Index: include/locale =================================================================== --- include/locale +++ include/locale @@ -727,7 +727,7 @@ num_get<_CharT, _InputIterator>::id; template -_Tp +_LIBCPP_HIDDEN _Tp __num_get_signed_integral(const char* __a, const char* __a_end, ios_base::iostate& __err, int __base) { @@ -762,7 +762,7 @@ } template -_Tp +_LIBCPP_HIDDEN _Tp __num_get_unsigned_integral(const char* __a, const char* __a_end, ios_base::iostate& __err, int __base) { Index: include/string =================================================================== --- include/string +++ include/string @@ -4036,6 +4036,7 @@ } template +_LIBCPP_INLINE_VISIBILITY basic_string<_CharT, _Traits, _Allocator> operator+(const basic_string<_CharT, _Traits, _Allocator>& __lhs, const _CharT* __rhs) { Index: lib/abi/CHANGELOG.TXT =================================================================== --- lib/abi/CHANGELOG.TXT +++ lib/abi/CHANGELOG.TXT @@ -16,7 +16,44 @@ Version 8.0 ----------- -* r345260 - Making libc++ build under -fvisibility=hidden +* rXXXXXX - Making libc++ build under -fvisibility=hidden on Linux + + The change marks several function templates as hidden. This removes symbols + from the shared library, but this is not an ABI break because it's impossible + for programs linking against libc++.so to actually depend on that symbol. + The reason is that the symbol is exported from the shared library through + an implicit instantiation present in the shared object itself only. Furthermore, + if a user's shared object was implicitly instantiating one of these functions, + marking that symbol as hidden would not be an ABI break for them because none + of their users could actually be using the symbol in their dylib (because + it's an implicit instantiation). + + x86_64-linux-gnu + ---------------- + Symbol removed: _ZNSt3__125__num_get_signed_integralIlEET_PKcS3_Rji + Symbol removed: _ZNSt3__125__num_get_signed_integralIxEET_PKcS3_Rji + Symbol removed: _ZNSt3__127__num_get_unsigned_integralIjEET_PKcS3_Rji + Symbol removed: _ZNSt3__127__num_get_unsigned_integralImEET_PKcS3_Rji + Symbol removed: _ZNSt3__127__num_get_unsigned_integralItEET_PKcS3_Rji + Symbol removed: _ZNSt3__127__num_get_unsigned_integralIyEET_PKcS3_Rji + Symbol removed: _ZNSt3__17__sort5IRNS_6__lessIaaEEPaEEjT0_S5_S5_S5_S5_T_ + Symbol removed: _ZNSt3__17__sort5IRNS_6__lessIccEEPcEEjT0_S5_S5_S5_S5_T_ + Symbol removed: _ZNSt3__17__sort5IRNS_6__lessIddEEPdEEjT0_S5_S5_S5_S5_T_ + Symbol removed: _ZNSt3__17__sort5IRNS_6__lessIffEEPfEEjT0_S5_S5_S5_S5_T_ + Symbol removed: _ZNSt3__17__sort5IRNS_6__lessIhhEEPhEEjT0_S5_S5_S5_S5_T_ + Symbol removed: _ZNSt3__17__sort5IRNS_6__lessIiiEEPiEEjT0_S5_S5_S5_S5_T_ + Symbol removed: _ZNSt3__17__sort5IRNS_6__lessIjjEEPjEEjT0_S5_S5_S5_S5_T_ + Symbol removed: _ZNSt3__17__sort5IRNS_6__lessIllEEPlEEjT0_S5_S5_S5_S5_T_ + Symbol removed: _ZNSt3__17__sort5IRNS_6__lessImmEEPmEEjT0_S5_S5_S5_S5_T_ + Symbol removed: _ZNSt3__17__sort5IRNS_6__lessIssEEPsEEjT0_S5_S5_S5_S5_T_ + Symbol removed: _ZNSt3__17__sort5IRNS_6__lessIttEEPtEEjT0_S5_S5_S5_S5_T_ + Symbol removed: _ZNSt3__17__sort5IRNS_6__lessIwwEEPwEEjT0_S5_S5_S5_S5_T_ + Symbol removed: _ZNSt3__17__sort5IRNS_6__lessIxxEEPxEEjT0_S5_S5_S5_S5_T_ + Symbol removed: _ZNSt3__17__sort5IRNS_6__lessIyyEEPyEEjT0_S5_S5_S5_S5_T_ + Symbol removed: _ZNSt3__1plIcNS_11char_traitsIcEENS_9allocatorIcEEEENS_12basic_stringIT_T0_T1_EERKS9_PKS6_ + Symbol removed: _ZSt18make_exception_ptrINSt3__112future_errorEESt13exception_ptrT_ + +* r345260 - Making libc++ build under -fvisibility=hidden on Mac OS The change marks __thread_specific_ptr<__thread_struct>::__at_thread_exit(void*) with hidden visibility. This removes a symbol from the shared libraries, Index: lib/abi/x86_64-unknown-linux-gnu.v1.abilist =================================================================== --- lib/abi/x86_64-unknown-linux-gnu.v1.abilist +++ lib/abi/x86_64-unknown-linux-gnu.v1.abilist @@ -1123,8 +1123,6 @@ {'name': '_ZNSt3__124__libcpp_debug_exceptionD0Ev', 'is_defined': True, 'type': 'FUNC'} {'name': '_ZNSt3__124__libcpp_debug_exceptionD1Ev', 'is_defined': True, 'type': 'FUNC'} {'name': '_ZNSt3__124__libcpp_debug_exceptionD2Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__125__num_get_signed_integralIlEET_PKcS3_Rji', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__125__num_get_signed_integralIxEET_PKcS3_Rji', 'is_defined': True, 'type': 'FUNC'} {'name': '_ZNSt3__125notify_all_at_thread_exitERNS_18condition_variableENS_11unique_lockINS_5mutexEEE', 'is_defined': True, 'type': 'FUNC'} {'name': '_ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIaaEEPaEEbT0_S5_T_', 'is_defined': True, 'type': 'FUNC'} {'name': '_ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIccEEPcEEbT0_S5_T_', 'is_defined': True, 'type': 'FUNC'} @@ -1142,10 +1140,6 @@ {'name': '_ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIxxEEPxEEbT0_S5_T_', 'is_defined': True, 'type': 'FUNC'} {'name': '_ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIyyEEPyEEbT0_S5_T_', 'is_defined': True, 'type': 'FUNC'} {'name': '_ZNSt3__127__libcpp_set_debug_functionEPFvRKNS_19__libcpp_debug_infoEE', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__127__num_get_unsigned_integralIjEET_PKcS3_Rji', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__127__num_get_unsigned_integralImEET_PKcS3_Rji', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__127__num_get_unsigned_integralItEET_PKcS3_Rji', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__127__num_get_unsigned_integralIyEET_PKcS3_Rji', 'is_defined': True, 'type': 'FUNC'} {'name': '_ZNSt3__129__libcpp_abort_debug_functionERKNS_19__libcpp_debug_infoE', 'is_defined': True, 'type': 'FUNC'} {'name': '_ZNSt3__129__libcpp_throw_debug_functionERKNS_19__libcpp_debug_infoE', 'is_defined': True, 'type': 'FUNC'} {'name': '_ZNSt3__13cinE', 'is_defined': True, 'type': 'OBJECT', 'size': 168} @@ -1262,21 +1256,7 @@ {'name': '_ZNSt3__16thread6detachEv', 'is_defined': True, 'type': 'FUNC'} {'name': '_ZNSt3__16threadD1Ev', 'is_defined': True, 'type': 'FUNC'} {'name': '_ZNSt3__16threadD2Ev', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__17__sort5IRNS_6__lessIaaEEPaEEjT0_S5_S5_S5_S5_T_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__17__sort5IRNS_6__lessIccEEPcEEjT0_S5_S5_S5_S5_T_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__17__sort5IRNS_6__lessIddEEPdEEjT0_S5_S5_S5_S5_T_', 'is_defined': True, 'type': 'FUNC'} {'name': '_ZNSt3__17__sort5IRNS_6__lessIeeEEPeEEjT0_S5_S5_S5_S5_T_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__17__sort5IRNS_6__lessIffEEPfEEjT0_S5_S5_S5_S5_T_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__17__sort5IRNS_6__lessIhhEEPhEEjT0_S5_S5_S5_S5_T_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__17__sort5IRNS_6__lessIiiEEPiEEjT0_S5_S5_S5_S5_T_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__17__sort5IRNS_6__lessIjjEEPjEEjT0_S5_S5_S5_S5_T_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__17__sort5IRNS_6__lessIllEEPlEEjT0_S5_S5_S5_S5_T_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__17__sort5IRNS_6__lessImmEEPmEEjT0_S5_S5_S5_S5_T_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__17__sort5IRNS_6__lessIssEEPsEEjT0_S5_S5_S5_S5_T_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__17__sort5IRNS_6__lessIttEEPtEEjT0_S5_S5_S5_S5_T_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__17__sort5IRNS_6__lessIwwEEPwEEjT0_S5_S5_S5_S5_T_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__17__sort5IRNS_6__lessIxxEEPxEEjT0_S5_S5_S5_S5_T_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__17__sort5IRNS_6__lessIyyEEPyEEjT0_S5_S5_S5_S5_T_', 'is_defined': True, 'type': 'FUNC'} {'name': '_ZNSt3__17codecvtIDic11__mbstate_tE2idE', 'is_defined': True, 'type': 'OBJECT', 'size': 16} {'name': '_ZNSt3__17codecvtIDic11__mbstate_tED0Ev', 'is_defined': True, 'type': 'FUNC'} {'name': '_ZNSt3__17codecvtIDic11__mbstate_tED1Ev', 'is_defined': True, 'type': 'FUNC'} @@ -1447,7 +1427,6 @@ {'name': '_ZNSt3__19to_stringEx', 'is_defined': True, 'type': 'FUNC'} {'name': '_ZNSt3__19to_stringEy', 'is_defined': True, 'type': 'FUNC'} {'name': '_ZNSt3__1plIcNS_11char_traitsIcEENS_9allocatorIcEEEENS_12basic_stringIT_T0_T1_EEPKS6_RKS9_', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZNSt3__1plIcNS_11char_traitsIcEENS_9allocatorIcEEEENS_12basic_stringIT_T0_T1_EERKS9_PKS6_', 'is_defined': True, 'type': 'FUNC'} {'name': '_ZNSt8bad_castC1Ev', 'is_defined': False, 'type': 'FUNC'} {'name': '_ZNSt8bad_castD1Ev', 'is_defined': False, 'type': 'FUNC'} {'name': '_ZNSt8bad_castD2Ev', 'is_defined': False, 'type': 'FUNC'} @@ -1458,7 +1437,6 @@ {'name': '_ZSt17__throw_bad_allocv', 'is_defined': True, 'type': 'FUNC'} {'name': '_ZSt17current_exceptionv', 'is_defined': True, 'type': 'FUNC'} {'name': '_ZSt17rethrow_exceptionSt13exception_ptr', 'is_defined': True, 'type': 'FUNC'} -{'name': '_ZSt18make_exception_ptrINSt3__112future_errorEESt13exception_ptrT_', 'is_defined': True, 'type': 'FUNC'} {'name': '_ZSt18uncaught_exceptionv', 'is_defined': True, 'type': 'FUNC'} {'name': '_ZSt19uncaught_exceptionsv', 'is_defined': True, 'type': 'FUNC'} {'name': '_ZSt7nothrow', 'is_defined': True, 'type': 'OBJECT', 'size': 1}