Build with -fvisibility=hidden

Summary:
This change changes the build to use -fvisibility=hidden

The exports this patch removes are symbols that should have never been exported
by the dylib in the first place, and should all be symbols which the linker
won't de-duplicate across SO boundaries, making them safe to remove.

After this change, we should be able to apply `_LIBCPP_HIDDEN` to the versioning namespace without changing the export lists.

Reviewers: ldionne, mclow.lists

Reviewed By: ldionne

Subscribers: smeenai, mgorny, libcxx-commits

Differential Revision: https://reviews.llvm.org/D53868

llvm-svn: 345664
This commit is contained in:
Eric Fiselier 2018-10-30 22:07:52 +00:00
parent e90a7df5a1
commit 6426a8d0c8
3 changed files with 1904 additions and 1883 deletions

View File

@ -530,6 +530,12 @@ add_compile_flags_if_supported(-nostdinc++)
# the dylib when get ODR used by another function.
add_compile_flags_if_supported(-fvisibility-inlines-hidden)
# Hide all function definitions not explicitly marked with _LIBCPP_FUNC_VIS
# (unless the symbol is explicitly instantiated).
# TODO: Both -fvisibily=hidden and -fvisibility-inlines-hidden should be
# removed once we apply _LIBCPP_HIDDEN at namespace scope.
add_compile_flags_if_supported(-fvisibility=hidden)
if (LIBCXX_CONFIGURE_IDE)
# This simply allows IDE to process <experimental/coroutine>
add_compile_flags_if_supported(-fcoroutines-ts)

View File

@ -12,6 +12,43 @@ Afterwards the ABI list should be updated to include the new changes.
New entries should be added directly below the "Version" header.
-----------
Version 8.0
-----------
* rTBD - Build with -fvisibility=hidden
This change changes the build to use -fvisibility=hidden
The exports this patch removes are symbols that should have never been exported
by the dylib in the first place, and should all be symbols which the linker
won't de-duplicate across SO boundaries, making them safe to remove.
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_
-----------
Version 7.0
-----------

File diff suppressed because it is too large Load Diff