From 1a067d57ba5c6130a0fd92e244fbf01eac4e6729 Mon Sep 17 00:00:00 2001 From: Joris Vaillant Date: Thu, 31 Oct 2024 15:20:04 +0100 Subject: [PATCH] config.hh: Don't use c++11 attributes in explicit template instantiation --- config.hh.cmake | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/config.hh.cmake b/config.hh.cmake index 3d64b9f8b..f3b0658a1 100644 --- a/config.hh.cmake +++ b/config.hh.cmake @@ -56,8 +56,9 @@ # define @LIBRARY_NAME@_DLLIMPORT [[gnu::visibility("default")]] # define @LIBRARY_NAME@_DLLEXPORT [[gnu::visibility("default")]] # define @LIBRARY_NAME@_DLLLOCAL [[gnu::visibility("hidden")]] -# define @LIBRARY_NAME@_EXPLICIT_INSTANTIATION_DECLARATION_DLLIMPORT [[gnu::visibility("default")]] -# define @LIBRARY_NAME@_EXPLICIT_INSTANTIATION_DECLARATION_DLLEXPORT [[gnu::visibility("default")]] +// gnu::visibility is not working with clang and explicit template instantiation +# define @LIBRARY_NAME@_EXPLICIT_INSTANTIATION_DECLARATION_DLLIMPORT __attribute__ ((visibility("default"))) +# define @LIBRARY_NAME@_EXPLICIT_INSTANTIATION_DECLARATION_DLLEXPORT __attribute__ ((visibility("default"))) # define @LIBRARY_NAME@_EXPLICIT_INSTANTIATION_DEFINITION_DLLIMPORT # define @LIBRARY_NAME@_EXPLICIT_INSTANTIATION_DEFINITION_DLLEXPORT # else