diff options
author | Martin Storsjo <martin@martin.st> | 2019-04-25 19:46:28 +0000 |
---|---|---|
committer | Martin Storsjo <martin@martin.st> | 2019-04-25 19:46:28 +0000 |
commit | 2bbb7feda84f59134a3d3d1e7a083a6857507ea4 (patch) | |
tree | dbfb1cd68b65bf626ff98cc2a384efe9bdca99bf | |
parent | 8edf8f317b59e9a69823c816e850a04b9b6ae015 (diff) | |
download | bcm5719-llvm-2bbb7feda84f59134a3d3d1e7a083a6857507ea4.tar.gz bcm5719-llvm-2bbb7feda84f59134a3d3d1e7a083a6857507ea4.zip |
Set _LIBCPP_DLL_VIS on _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS in MinGW mode
Contrary to MSVC, MinGW compilers wants the dllexport attribute on
the declaration of an explicit template instantiation, not on the
definition.
Differential Revision: https://reviews.llvm.org/D61123
llvm-svn: 359227
-rw-r--r-- | libcxx/include/__config | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/libcxx/include/__config b/libcxx/include/__config index 0488093aa05..f597e195a2d 100644 --- a/libcxx/include/__config +++ b/libcxx/include/__config @@ -668,8 +668,13 @@ typedef __char32_t char32_t; # define _LIBCPP_EXPORTED_FROM_ABI #elif defined(_LIBCPP_BUILDING_LIBRARY) # define _LIBCPP_DLL_VIS __declspec(dllexport) -# define _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS -# define _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS _LIBCPP_DLL_VIS +# if defined(__MINGW32__) +# define _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS _LIBCPP_DLL_VIS +# define _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS +# else +# define _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS +# define _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS _LIBCPP_DLL_VIS +# endif # define _LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_DLL_VIS # define _LIBCPP_EXPORTED_FROM_ABI __declspec(dllexport) #else |