This enables building libc++abi with -fvisibility=hidden if the compiler supports it. This is required to ensure that only public interfaces are made available from the library. Currently, the ABI difference between the default and hidden versions is:
- __cxa_new_handler
- __cxa_terminate_handler
- __cxa_unexpected_handler
On Darwin, the difference between the version shipped in 10.11 and the hidden visibility is a bit more interesting as follows:
- __cxa_new_handler
- __cxa_terminate_handler
- cxa_unexpected_handler + cxa_throw_bad_array_new_length + __cxa_uncaught_exceptions
Linux is even more interesting with the following diffs:
- __cxa_new_handler
- __cxa_terminate_handler
- __cxa_unexpected_handler
- _ZNKSt3120vector_base_commonILb1EE20__throw_length_errorEv
- _ZNKSt3121basic_string_commonILb1EE20__throw_length_errorEv
- _ZNKSt3121basic_string_commonILb1EE20__throw_out_of_rangeEv
The last three removed on Linux is more of a bug fix as they are supposed to be provided either by libc++ or inlined.
Its unclear whether the diffs are part of the public ABI or not.