diff --git a/src/base/basictypes.h b/src/base/basictypes.h index 2862c11..4779611 100644 --- a/src/base/basictypes.h +++ b/src/base/basictypes.h @@ -231,6 +231,12 @@ inline Dest bit_cast(const Source& source) { # define ATTRIBUTE_NOINLINE #endif +#if defined(HAVE___ATTRIBUTE__) && defined(__ELF__) +# define ATTRIBUTE_VISIBILITY_HIDDEN __attribute__((visibility("hidden"))) +#else +# define ATTRIBUTE_VISIBILITY_HIDDEN +#endif + // Section attributes are supported for both ELF and Mach-O, but in // very different ways. Here's the API we provide: // 1) ATTRIBUTE_SECTION: put this with the declaration of all functions