From de8018a17d9b84b2a57761ad624cc669c4e136a4 Mon Sep 17 00:00:00 2001 From: Nikita Churaev Date: Tue, 9 Jan 2018 22:36:13 +0300 Subject: Add `export_dynamic` argument to `executable`. (#2662) --- mesonbuild/compilers/c.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'mesonbuild/compilers') diff --git a/mesonbuild/compilers/c.py b/mesonbuild/compilers/c.py index 233fc84..4c6e3a2 100644 --- a/mesonbuild/compilers/c.py +++ b/mesonbuild/compilers/c.py @@ -183,6 +183,14 @@ class CCompiler(Compiler): def get_default_include_dirs(self): return [] + def gen_export_dynamic_link_args(self, env): + if for_windows(env.is_cross_build(), env): + return ['-Wl,--export-all-symbols'] + elif for_darwin(env.is_cross_build(), env): + return [] + else: + return ['-Wl,-export-dynamic'] + def gen_import_library_args(self, implibname): """ The name of the outputted import library -- cgit v1.1