Blame src/internal/perk_visibility_impl.h

2baf67
#ifndef PERK_VISIBILITY_IMPL_H
2baf67
#define PERK_VISIBILITY_IMPL_H
2baf67
2baf67
/**********************************************************************/
2baf67
/* PE targets: __dllexport suffices for the purpose of exporting only */
2baf67
/* the desired subset of global symbols; this makes the visibility    */
2baf67
/* attribute not only redundant, but also tricky if not properly      */
2baf67
/* supported by the toolchain.                                        */
2baf67
/*                                                                    */
48569f
/* When targeting Midipix hosts, where elf-like visibility is fully   */
48569f
/* supported and may be detected via the __PE_VISIBILITY__ macro,     */
48569f
/* we utilize the attribute to render private symbols invisibile      */
48569f
/* to dlsym(), as well as reduce the size of the .gotstrs section.    */
2baf67
/**********************************************************************/
2baf67
48569f
#if defined(__PE_VISIBILITY__)
48569f
#define perk_hidden _ATTR_VISIBILITY_HIDDEN
48569f
#elif defined(__PE__)
2baf67
#define perk_hidden
48569f
#elif defined(_ATTR_VISIBILITY_HIDDEN)
2baf67
#define perk_hidden _ATTR_VISIBILITY_HIDDEN
2baf67
#else
2baf67
#define perk_hidden
2baf67
#endif
2baf67
2baf67
#endif