Jacek Caban (@jacek) commented about include/winnt.h:
#endif
#ifndef DECLSPEC_HIDDEN -# if defined(_MSC_VER) || defined(__MINGW32__) || defined(__CYGWIN__) || defined(__sun) +# if defined(_MSC_VER) || (defined(__MINGW32__) && !defined(__clang__)) || defined(__CYGWIN__) || defined(__sun)
FWIW, it's not really useful for building Wine itself. I think that it's used only in "export all" case on PE targets and we don't use that. We could probably still expose that in headers for winelib. For that, something like "|| __has_attribute(visibility)" should be a bit more flexible.