wscript: substitute cplugins linker flag for macOS compatiblity

For an unknown reason, '-Wl -export-dynamic' doesn't work anymore
on the last macOS build (10.12.3 with Apple LLVM 8.0.0) so forcing
cplugins is useless because the check fails. Replacing the linker
option with its substitute '-rdynamic' do the trick.

The syms module from waf still works as expected and only the
symbols specified in mpv.def are exported.
This commit is contained in:
Alexis Nootens 2017-03-02 14:40:14 +01:00 committed by wm4
parent e226041355
commit 1245ac1dc5
1 changed files with 2 additions and 2 deletions

View File

@ -72,7 +72,7 @@ build_options = [
'desc': 'C plugins',
'deps': [ 'libdl' ],
'default': 'disable',
'func': check_cc(linkflags=['-Wl,-export-dynamic']),
'func': check_cc(linkflags=['-rdynamic']),
}, {
'name': 'dlopen',
'desc': 'dlopen',
@ -1033,7 +1033,7 @@ def configure(ctx):
# not linked against libmpv. The C plugin needs to be able to pick
# up the libmpv symbols from the binary. We still restrict the set
# of exported symbols via mpv.def.
ctx.env.LINKFLAGS += ['-Wl,-export-dynamic']
ctx.env.LINKFLAGS += ['-rdynamic']
ctx.store_dependencies_lists()