Browse Source

MinGW symbol visibility fix

When using separate sources MinGW would use GCC symbol visibility attributes
which cause: "warning: visibility attribute not supported in this
configuration; ignored".

Avoid using GCC symbol visibility attributes with MinGW.  Instead, use either
no visibility attributes or Windows specific __declspec(dllexport) and
__declspec(dllimport).
pull/113/head
Sami Vaarala 10 years ago
parent
commit
02fa40dddb
  1. 7
      src/duk_features.h.in

7
src/duk_features.h.in

@ -1966,8 +1966,11 @@ typedef FILE duk_file;
/* XXX: separate macros for function and data may be necessary at some point. */
#if defined(DUK_F_GCC_VERSION)
#if (DUK_F_GCC_VERSION >= 40000)
/* Might work on earlier versions too but limit to GCC 4+. */
#if (DUK_F_GCC_VERSION >= 40000) && !defined(DUK_F_MINGW)
/* Might work on earlier versions too but limit to GCC 4+.
* MinGW should use Windows specific __declspec or no visibility attributes at all,
* otherwise: "warning: visibility attribute not supported in this configuration; ignored"
*/
#define DUK_F_GCC_SYMBOL_VISIBILITY
#endif
#endif

Loading…
Cancel
Save