summaryrefslogtreecommitdiff
path: root/libcxxabi
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2023-04-15 21:58:51 +0000
committerMartin Storsjö <martin@martin.st>2023-04-19 13:34:54 +0300
commit692518d04b2d170b1ae10c50843e7c497c4a9922 (patch)
treece7220a464cdbbd14e8511fd5b18b104213459d3 /libcxxabi
parent045eec61f36b8612643808e0c14b4a37184756f1 (diff)
downloadllvm-692518d04b2d170b1ae10c50843e7c497c4a9922.tar.gz
[libcxxabi] Omit dllimport in public headers in MinGW mode
This matches the corresponding change to libcxx headers in dfa88927ae1411ccc3b248b7e624f2acf623d947. This avoids needing to define _LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS when building libcxxabi tests, for two reasons: - It defaults to normal linkage (as opposed to dllimport), fixing linking of a static library version of libcxx/libcxxabi - It avoids issues with using dllimport declarations on symbols when including cxxabi implementations into the testcase itself Differential Revision: https://reviews.llvm.org/D148441
Diffstat (limited to 'libcxxabi')
-rw-r--r--libcxxabi/include/__cxxabi_config.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/libcxxabi/include/__cxxabi_config.h b/libcxxabi/include/__cxxabi_config.h
index c97dd656e165..e8aa37e6d5ec 100644
--- a/libcxxabi/include/__cxxabi_config.h
+++ b/libcxxabi/include/__cxxabi_config.h
@@ -32,7 +32,7 @@
#endif
#if defined(_WIN32)
- #if defined(_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS)
+ #if defined(_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS) || (defined(__MINGW32__) && !defined(_LIBCXXABI_BUILDING_LIBRARY))
#define _LIBCXXABI_HIDDEN
#define _LIBCXXABI_DATA_VIS
#define _LIBCXXABI_FUNC_VIS