[libcxx] r349080 - [libc++] Fix _LIBCPP_EXPORTED_FROM_ABI when visibility annotations are disabled
Thomas Anderson
thomasanderson at google.com
Thu Dec 13 12:06:14 PST 2018
Author: thomasanderson
Date: Thu Dec 13 12:06:14 2018
New Revision: 349080
URL: http://llvm.org/viewvc/llvm-project?rev=349080&view=rev
Log:
[libc++] Fix _LIBCPP_EXPORTED_FROM_ABI when visibility annotations are disabled
Fixes a bug where functions would get exported when building with
-fvisibility=hidden and defining _LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS. No
visibility annotations should be added in this case.
The new logic for _LIBCPP_EXPORTED_FROM_ABI matches that of the other visibility
annotations around it.
Differential Revision: https://reviews.llvm.org/D55664
Modified:
libcxx/trunk/include/__config
Modified: libcxx/trunk/include/__config
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/__config?rev=349080&r1=349079&r2=349080&view=diff
==============================================================================
--- libcxx/trunk/include/__config (original)
+++ libcxx/trunk/include/__config Thu Dec 13 12:06:14 2018
@@ -715,7 +715,11 @@ typedef __char32_t char32_t;
#endif
#ifndef _LIBCPP_EXPORTED_FROM_ABI
-# define _LIBCPP_EXPORTED_FROM_ABI __attribute__((__visibility__("default")))
+# if !defined(_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS)
+# define _LIBCPP_EXPORTED_FROM_ABI __attribute__((__visibility__("default")))
+# else
+# define _LIBCPP_EXPORTED_FROM_ABI
+# endif
#endif
#ifndef _LIBCPP_OVERRIDABLE_FUNC_VIS
More information about the libcxx-commits
mailing list