diff options
Diffstat (limited to 'include/common/attributes.h')
-rw-r--r-- | include/common/attributes.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/common/attributes.h b/include/common/attributes.h index ba04fcb..2af42ef 100644 --- a/include/common/attributes.h +++ b/include/common/attributes.h @@ -113,6 +113,12 @@ #define ALWAYS_INLINE __attribute__((always_inline)) inline #endif +#if (defined(__ELF__) || defined(__MACH__) || (defined(_WIN32) && defined(__clang__))) && __has_attribute(visibility) +#define EXTERN extern __attribute__((visibility("hidden"))) +#else +#define EXTERN extern +#endif + #ifdef __clang__ #define NO_SANITIZE(x) __attribute__((no_sanitize(x))) #else |