Skip to content

Commit

Permalink
Build with -fvisibility=hidden
Browse files Browse the repository at this point in the history
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
EricWF committed Oct 30, 2018

Unverified

This user has not yet uploaded their public signing key.
1 parent e90a7df commit 6426a8d
Showing 3 changed files with 1,904 additions and 1,883 deletions.
6 changes: 6 additions & 0 deletions libcxx/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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)
37 changes: 37 additions & 0 deletions libcxx/lib/abi/CHANGELOG.TXT
Original file line number Diff line number Diff line change
@@ -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
-----------
3,744 changes: 1,861 additions & 1,883 deletions libcxx/lib/abi/x86_64-unknown-linux-gnu.v1.abilist

Large diffs are not rendered by default.

0 comments on commit 6426a8d

Please sign in to comment.