From fc0884037e9fe77faebbb3c31484837305276066 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Fri, 3 Sep 2021 16:25:58 -0700 Subject: [PATCH] Move FMT_GCC_VISIBILITY_HIDDEN to format.h --- include/fmt/core.h | 6 ------ include/fmt/format.h | 6 ++++++ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/fmt/core.h b/include/fmt/core.h index 2df549e4..dd05f99f 100644 --- a/include/fmt/core.h +++ b/include/fmt/core.h @@ -247,12 +247,6 @@ # define FMT_API #endif -#if FMT_GCC_VERSION -# define FMT_GCC_VISIBILITY_HIDDEN __attribute__((visibility("hidden"))) -#else -# define FMT_GCC_VISIBILITY_HIDDEN -#endif - // libc++ supports string_view in pre-c++17. #if (FMT_HAS_INCLUDE() && \ (__cplusplus > 201402L || defined(_LIBCPP_VERSION))) || \ diff --git a/include/fmt/format.h b/include/fmt/format.h index 08ee57d9..f1417f86 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h @@ -43,6 +43,12 @@ #include "core.h" +#if FMT_GCC_VERSION +# define FMT_GCC_VISIBILITY_HIDDEN __attribute__((visibility("hidden"))) +#else +# define FMT_GCC_VISIBILITY_HIDDEN +#endif + #ifdef __INTEL_COMPILER # define FMT_ICC_VERSION __INTEL_COMPILER #elif defined(__ICL)