From 9b3222f6134f40b68e16faf694ed9e97bc9fd325 Mon Sep 17 00:00:00 2001 From: Louis Dionne Date: Thu, 25 Oct 2018 12:13:43 +0000 Subject: [libc++] Make sure we can build libc++ with -fvisibility=hidden Summary: When building with -fvisibility=hidden, some symbols do not get exported from libc++.dylib. This means that some entities are not explicitly given default visibility in the source code, and that we rely on the fact -fvisibility=default is the default. This commit explicitly gives default visibility to those symbols to avoid being dependent on the command line flags used. The commit also remove symbols from the dylib -- those symbols do not actually need to be exported from the dylib and this should not be an ABI break. Finally, in the future, we may want to mark the whole std:: namespace as having hidden visibility (to switch from opt-out to opt-in), in which case the changes done in this commit will be required. Reviewers: EricWF Subscribers: mgorny, christof, dexonsmith, libcxx-commits Differential Revision: https://reviews.llvm.org/D52662 llvm-svn: 345260 --- libcxx/include/__debug | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libcxx/include/__debug') diff --git a/libcxx/include/__debug b/libcxx/include/__debug index d01bacdf7ed..a8788f68f8f 100644 --- a/libcxx/include/__debug +++ b/libcxx/include/__debug @@ -74,7 +74,7 @@ typedef void(*__libcpp_debug_function_type)(__libcpp_debug_info const&); /// __libcpp_debug_function - The handler function called when a _LIBCPP_ASSERT /// fails. -extern _LIBCPP_EXTERN_VIS __libcpp_debug_function_type __libcpp_debug_function; +extern _LIBCPP_EXPORTED_FROM_ABI __libcpp_debug_function_type __libcpp_debug_function; /// __libcpp_abort_debug_function - A debug handler that aborts when called. _LIBCPP_NORETURN _LIBCPP_FUNC_VIS -- cgit v1.2.3