summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorShoaib Meenai <smeenai@fb.com>2016-09-27 03:44:09 +0000
committerShoaib Meenai <smeenai@fb.com>2016-09-27 03:44:09 +0000
commita0863319144d468d524c8606e56ebbfb77c2bf71 (patch)
tree59df35be0dcbfcce2e0048a2cca4340faea7a0cb /include
parent46eb39a561ce4e4952abcb05378e38f01fd3fac6 (diff)
[libc++abi] Default to DLL annotations on Windows
`__declspec(dllexport)` and `__declspec(dllimport)` should only be used when building libc++abi as a DLL, but that's the more common use case, so default to adding the annotations and add an option to opt out. Similar to r282449, which made the corresponding change for libc++. Differential Revision: https://reviews.llvm.org/D24945 git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@282470 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/__cxxabi_config.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/include/__cxxabi_config.h b/include/__cxxabi_config.h
index 61555f1..0e7106e 100644
--- a/include/__cxxabi_config.h
+++ b/include/__cxxabi_config.h
@@ -21,8 +21,13 @@
#define __has_attribute(_attribute_) 0
#endif
-#if defined(_LIBCXXABI_DLL)
- #if defined(cxxabi_EXPORTS)
+#if defined(_WIN32)
+ #if defined(_LIBCXXABI_DISABLE_DLL_IMPORT_EXPORT)
+ #define _LIBCXXABI_HIDDEN
+ #define _LIBCXXABI_DATA_VIS
+ #define _LIBCXXABI_FUNC_VIS
+ #define _LIBCXXABI_TYPE_VIS
+ #elif defined(_LIBCXXABI_BUILDING_LIBRARY)
#define _LIBCXXABI_HIDDEN
#define _LIBCXXABI_DATA_VIS __declspec(dllexport)
#define _LIBCXXABI_FUNC_VIS __declspec(dllexport)