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)