forked from OSchip/llvm-project
[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 llvm-svn: 288692
This commit is contained in:
parent
07522bb187
commit
1bc40a8e2d
|
@ -22,7 +22,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(_WIN32)
|
#if defined(_WIN32)
|
||||||
#if defined(_LIBCXXABI_DISABLE_DLL_IMPORT_EXPORT)
|
#if defined(_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS)
|
||||||
#define _LIBCXXABI_HIDDEN
|
#define _LIBCXXABI_HIDDEN
|
||||||
#define _LIBCXXABI_DATA_VIS
|
#define _LIBCXXABI_DATA_VIS
|
||||||
#define _LIBCXXABI_FUNC_VIS
|
#define _LIBCXXABI_FUNC_VIS
|
||||||
|
@ -39,6 +39,7 @@
|
||||||
#define _LIBCXXABI_TYPE_VIS __declspec(dllimport)
|
#define _LIBCXXABI_TYPE_VIS __declspec(dllimport)
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
|
#if !defined(_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS)
|
||||||
#define _LIBCXXABI_HIDDEN __attribute__((__visibility__("hidden")))
|
#define _LIBCXXABI_HIDDEN __attribute__((__visibility__("hidden")))
|
||||||
#define _LIBCXXABI_DATA_VIS __attribute__((__visibility__("default")))
|
#define _LIBCXXABI_DATA_VIS __attribute__((__visibility__("default")))
|
||||||
#define _LIBCXXABI_FUNC_VIS __attribute__((__visibility__("default")))
|
#define _LIBCXXABI_FUNC_VIS __attribute__((__visibility__("default")))
|
||||||
|
@ -47,6 +48,12 @@
|
||||||
#else
|
#else
|
||||||
#define _LIBCXXABI_TYPE_VIS __attribute__((__visibility__("default")))
|
#define _LIBCXXABI_TYPE_VIS __attribute__((__visibility__("default")))
|
||||||
#endif
|
#endif
|
||||||
|
#else
|
||||||
|
#define _LIBCXXABI_HIDDEN
|
||||||
|
#define _LIBCXXABI_DATA_VIS
|
||||||
|
#define _LIBCXXABI_FUNC_VIS
|
||||||
|
#define _LIBCXXABI_TYPE_VIS
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif // ____CXXABI_CONFIG_H
|
#endif // ____CXXABI_CONFIG_H
|
||||||
|
|
Loading…
Reference in New Issue