Skip to content
  • LRN's avatar
    Use a real test for G_HAVE_GNUC_VISIBILITY · a9c65317
    LRN authored
    Accurate G_HAVE_GNUC_VISIBILITY is needed to correctly
    define G_GNUC_INTERNAL later on. Autotools did that,
    meson currently doesn't and opts to just set
    G_HAVE_GNUC_VISIBILITY to 1 for all compilers except MSVC.
    This leads to MinGW GCC having G_HAVE_GNUC_VISIBILITY=1,
    which results in G_GNUC_INTERNAL being defined to
    __attribute__((visibility("hidden"))), which is not supported.
    
    Because cc.compiles() does not support override_options or
    anything like that, we just feed it '-Werror' as-is, since
    MSVC is known as not supporting visibility attributes anyway.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=794636
    a9c65317