summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gnome.org>2017-06-06 10:50:14 +0100
committerEmmanuele Bassi <ebassi@gnome.org>2017-06-06 10:50:14 +0100
commit898ba5d49799b9dd079c7bf99b76d668a8bcd5f3 (patch)
tree79de49c111e492569540420c3d103ceea6b0df58 /meson.build
parenteaaafd5b3454cb92fbb108516e841f725e3bc364 (diff)
downloadlibepoxy-898ba5d49799b9dd079c7bf99b76d668a8bcd5f3.tar.gz
meson: Fix the MSVC symbol visibility check
We kind of cargo-culted from Autotools; MSVC and GCC on Windows can use the same __declspec() attribute. Only the compiler flag is a GCC thing.
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build8
1 files changed, 3 insertions, 5 deletions
diff --git a/meson.build b/meson.build
index b115dc0..f14c811 100644
--- a/meson.build
+++ b/meson.build
@@ -153,7 +153,7 @@ endif
common_cflags = []
foreach cflag: test_cflags
if cc.has_argument(cflag)
- common_cflags += [ cflag ]
+ common_cflags += cflag
endif
endforeach
@@ -164,10 +164,8 @@ if libtype == 'shared'
visibility_cflags = []
if host_system == 'windows'
conf.set('DLL_EXPORT', true)
- if cc.get_id() == 'msvc'
- conf.set('EPOXY_PUBLIC', '__declspec(dllexport) extern')
- else
- conf.set('EPOXY_PUBLIC', '__attribute__((visibility("default"))) __declspec(dllexport) extern')
+ conf.set('EPOXY_PUBLIC', '__declspec(dllexport) extern')
+ if cc.get_id() != 'msvc'
visibility_cflags += [ '-fvisibility=hidden' ]
endif
else