On 8/4/21 7:48 AM, Henri Verbeet wrote:
On Wed, 4 Aug 2021 at 05:53, Zebediah Figura zfigura@codeweavers.com wrote:
+#if defined(__GNUC__) && !defined(__MINGW32__) +# define VKD3D_API __attribute__((visibility("default"))) +#else +# define VKD3D_API +#endif
Arguably this is more about _WIN32 than about __MINGW32__. On _WIN32 we'd want to add dllimport/dllexport instead, perhaps as a followup.
I was following the current code here (so one could argue that s/__MINGW32__/_WIN32/ deserves a followup anyway).
That said, it's not obvious to me why this should be _WIN32. My understanding is that mingw doesn't support visibility attributes at all, hence the empty definition, but presumably we'd still want to mark visibility on ELF win32 targets (which I guess means winelib).