[libcxx-commits] [PATCH] D148441: [libcxxabi] Omit dllimport in public headers in MinGW mode
Martin Storsjö via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Sat Apr 15 15:03:04 PDT 2023
mstorsjo created this revision.
Herald added a project: All.
mstorsjo requested review of this revision.
Herald added a project: libc++abi.
Herald added a reviewer: libc++abi.
This matches the corresponding change to libcxx headers in
dfa88927ae1411ccc3b248b7e624f2acf623d947 <https://reviews.llvm.org/rGdfa88927ae1411ccc3b248b7e624f2acf623d947>.
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
This allows simplifying D147638 <https://reviews.llvm.org/D147638>.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D148441
Files:
libcxxabi/include/__cxxabi_config.h
Index: libcxxabi/include/__cxxabi_config.h
===================================================================
--- libcxxabi/include/__cxxabi_config.h
+++ 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D148441.513941.patch
Type: text/x-patch
Size: 512 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20230415/b9279d60/attachment-0001.bin>
More information about the libcxx-commits
mailing list