meson: Build modules with '-Wl,no-undefined'
authorArnaud Rebillout <arnaud.rebillout@collabora.com>
Thu, 20 Sep 2018 08:36:13 +0000 (15:36 +0700)
committerArun Raghavan <arun@arunraghavan.net>
Thu, 4 Oct 2018 03:14:18 +0000 (08:44 +0530)
This flag will make the loader fail if symbols are not resolved. It
seems to be our best bet to uncover every missing module dependencies.

For more details, I recommend to read:
<http://www.kaizou.org/2015/01/linux-libraries/>

Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
src/modules/meson.build

index fd9f082..1d5e908 100644 (file)
@@ -131,6 +131,7 @@ foreach m : all_modules
     c_args : [pa_c_args, server_c_args, '-DPA_MODULE_NAME=' + name.underscorify()] + extra_flags,
     install : true,
     dependencies : [thread_dep, libpulse_dep, libpulsecore_dep] + extra_deps,
+    link_args : [ '-Wl,--no-undefined' ],
     link_with : extra_libs,
     name_prefix : '',
     implicit_include_directories : false)