Cleanup handling of visibility
This commit is contained in:
parent
016b1faede
commit
6c088be8ec
@ -185,18 +185,20 @@
|
|||||||
# define FMT_END_EXPORT
|
# define FMT_END_EXPORT
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if FMT_GCC_VERSION || defined(__clang__)
|
||||||
|
# define FMT_VISIBILITY(value) __attribute__((visibility(value)))
|
||||||
|
#else
|
||||||
|
# define FMT_VISIBILITY(value)
|
||||||
|
#endif
|
||||||
|
|
||||||
#if !defined(FMT_HEADER_ONLY) && defined(_WIN32)
|
#if !defined(FMT_HEADER_ONLY) && defined(_WIN32)
|
||||||
# ifdef FMT_LIB_EXPORT
|
# ifdef FMT_LIB_EXPORT
|
||||||
# define FMT_API __declspec(dllexport)
|
# define FMT_API __declspec(dllexport)
|
||||||
# elif defined(FMT_SHARED)
|
# elif defined(FMT_SHARED)
|
||||||
# define FMT_API __declspec(dllimport)
|
# define FMT_API __declspec(dllimport)
|
||||||
# endif
|
# endif
|
||||||
#else
|
#elif defined(FMT_LIB_EXPORT) || defined(FMT_SHARED)
|
||||||
# if defined(FMT_LIB_EXPORT) || defined(FMT_SHARED)
|
# define FMT_API FMT_VISIBILITY("default")
|
||||||
# if defined(__GNUC__) || defined(__clang__)
|
|
||||||
# define FMT_API __attribute__((visibility("default")))
|
|
||||||
# endif
|
|
||||||
# endif
|
|
||||||
#endif
|
#endif
|
||||||
#ifndef FMT_API
|
#ifndef FMT_API
|
||||||
# define FMT_API
|
# define FMT_API
|
||||||
|
@ -93,17 +93,11 @@
|
|||||||
# define FMT_NO_UNIQUE_ADDRESS
|
# define FMT_NO_UNIQUE_ADDRESS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if FMT_GCC_VERSION || defined(__clang__)
|
// Visibility when compiled as a shared library/object.
|
||||||
# define FMT_VISIBILITY(value) __attribute__((visibility(value)))
|
#if defined(FMT_LIB_EXPORT) || defined(FMT_SHARED)
|
||||||
|
# define FMT_SO_VISIBILITY(value) FMT_VISIBILITY(value)
|
||||||
#else
|
#else
|
||||||
# define FMT_VISIBILITY(value)
|
# define FMT_SO_VISIBILITY(value)
|
||||||
#endif
|
|
||||||
|
|
||||||
#if !defined(FMT_HEADER_ONLY) && !defined(_WIN32) && \
|
|
||||||
(defined(FMT_LIB_EXPORT) || defined(FMT_SHARED))
|
|
||||||
# define FMT_INLINE_API FMT_VISIBILITY("default")
|
|
||||||
#else
|
|
||||||
# define FMT_INLINE_API
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __has_builtin
|
#ifdef __has_builtin
|
||||||
@ -1053,7 +1047,7 @@ FMT_BEGIN_EXPORT
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/** An error reported from a formatting function. */
|
/** An error reported from a formatting function. */
|
||||||
class FMT_INLINE_API format_error : public std::runtime_error {
|
class FMT_SO_VISIBILITY("default") format_error : public std::runtime_error {
|
||||||
public:
|
public:
|
||||||
using std::runtime_error::runtime_error;
|
using std::runtime_error::runtime_error;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user