From 1245ac1dc527e10c57b40f9c82c652a68904c86e Mon Sep 17 00:00:00 2001 From: Alexis Nootens Date: Thu, 2 Mar 2017 14:40:14 +0100 Subject: [PATCH] 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. --- wscript | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wscript b/wscript index eb97d7749b..18bb420c97 100644 --- a/wscript +++ b/wscript @@ -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()