summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorShoaib Meenai <smeenai@fb.com>2016-12-05 19:42:11 +0000
committerShoaib Meenai <smeenai@fb.com>2016-12-05 19:42:11 +0000
commita3219dad2cf0dec6d7c753fc2702a8781a7fd3df (patch)
tree2a4ad3837a50f5a75b323ae05fabc827633763da /include
parent6d9aad0608e8a3012bd84b76033b81ae234d4fef (diff)
[libc++abi] Add _LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS
It's useful to be able to disable visibility annotations entirely; for example, if we're building libc++abi static to include in another library, and we don't want any libc++abi functions getting exported out of that library. This is a generalization of _LIBCXXABI_DISABLE_DLL_IMPORT_EXPORT. Differential Revision: https://reviews.llvm.org/D26950 git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@288692 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/__cxxabi_config.h21
1 files changed, 14 insertions, 7 deletions
diff --git a/include/__cxxabi_config.h b/include/__cxxabi_config.h
index 0e7106e..2c58a22 100644
--- a/include/__cxxabi_config.h
+++ b/include/__cxxabi_config.h
@@ -22,7 +22,7 @@
#endif
#if defined(_WIN32)
- #if defined(_LIBCXXABI_DISABLE_DLL_IMPORT_EXPORT)
+ #if defined(_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS)
#define _LIBCXXABI_HIDDEN
#define _LIBCXXABI_DATA_VIS
#define _LIBCXXABI_FUNC_VIS
@@ -39,13 +39,20 @@
#define _LIBCXXABI_TYPE_VIS __declspec(dllimport)
#endif
#else
- #define _LIBCXXABI_HIDDEN __attribute__((__visibility__("hidden")))
- #define _LIBCXXABI_DATA_VIS __attribute__((__visibility__("default")))
- #define _LIBCXXABI_FUNC_VIS __attribute__((__visibility__("default")))
- #if __has_attribute(__type_visibility__)
- #define _LIBCXXABI_TYPE_VIS __attribute__((__type_visibility__("default")))
+ #if !defined(_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS)
+ #define _LIBCXXABI_HIDDEN __attribute__((__visibility__("hidden")))
+ #define _LIBCXXABI_DATA_VIS __attribute__((__visibility__("default")))
+ #define _LIBCXXABI_FUNC_VIS __attribute__((__visibility__("default")))
+ #if __has_attribute(__type_visibility__)
+ #define _LIBCXXABI_TYPE_VIS __attribute__((__type_visibility__("default")))
+ #else
+ #define _LIBCXXABI_TYPE_VIS __attribute__((__visibility__("default")))
+ #endif
#else
- #define _LIBCXXABI_TYPE_VIS __attribute__((__visibility__("default")))
+ #define _LIBCXXABI_HIDDEN
+ #define _LIBCXXABI_DATA_VIS
+ #define _LIBCXXABI_FUNC_VIS
+ #define _LIBCXXABI_TYPE_VIS
#endif
#endif