diff options
author | Emmanuele Bassi <ebassi@gnome.org> | 2017-03-09 21:21:09 +0000 |
---|---|---|
committer | Emmanuele Bassi <ebassi@gnome.org> | 2017-03-09 21:21:09 +0000 |
commit | 4719e586c0f92fa7546fa954115b92d2ae9aee9f (patch) | |
tree | 4244840c1d059fb72d49e2e1f30b20a8761ce18a /meson.build | |
parent | fef61ab6bedc551245582f4286ff326ceb63a264 (diff) | |
download | libepoxy-4719e586c0f92fa7546fa954115b92d2ae9aee9f.tar.gz |
Add missing visibility compiler flags
We have been building the shared library for Epoxy without the symbol
visibility flags for the compiler, which means we've been leaking
internal symbols all over the floor.
Fixes: #111
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/meson.build b/meson.build index 95aac5c..afe576b 100644 --- a/meson.build +++ b/meson.build @@ -140,9 +140,11 @@ foreach cflag: test_cflags endif endforeach -# Visibility compiler flags -visibility_cflags = [] -if get_option('default_library') != 'static' +libtype = get_option('default_library') + +# Visibility compiler flags; we only use this for shared libraries +if libtype == 'shared' + visibility_cflags = [] if host_system == 'windows' conf.set('DLL_EXPORT', true) if cc.get_id() == 'msvc' @@ -152,7 +154,7 @@ if get_option('default_library') != 'static' visibility_cflags += [ '-fvisibility=hidden' ] endif else - conf.set('EPOXY_PUBLIC', '__attribute__((visibility("default")))') + conf.set('EPOXY_PUBLIC', '__attribute__((visibility("default"))) extern') visibility_cflags += [ '-fvisibility=hidden' ] endif endif |