Skip to content

Commit

Permalink
meson: Fix the MSVC symbol visibility check
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
ebassi committed Jun 6, 2017
1 parent eaaafd5 commit 898ba5d
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ endif
common_cflags = []
foreach cflag: test_cflags
if cc.has_argument(cflag)
common_cflags += [ cflag ]
common_cflags += cflag
endif
endforeach

Expand All @@ -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
Expand Down

0 comments on commit 898ba5d

Please sign in to comment.