From: Christophe de Dinechin Date: Mon, 8 Aug 2022 18:14:08 +0000 (+0200) Subject: tests: Pass the flat_namespace option to the linker X-Git-Tag: v8.7.0-rc1~186 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ede39c1fc6904cc961334d64f4dd54d54b799c4a;p=thirdparty%2Flibvirt.git tests: Pass the flat_namespace option to the linker This fixes vircryptotest on macOS 12 (Monterey). The test relies on library injection (using DYLD_INSERT_LIBRARIES) to replace the normal random functions with functions giving predictable results, defined in virrandommock.c. However, using DYLD_INSERT_LIBRARIES only works when building with flat namespaces. Adding the -Wl,-flat_namespace option to the linker fixes the problem. The option was already defined in the top-level meson.build, but had been forgotten in the test linker arguments. Signed-off-by: Christophe de Dinechin Reviewed-by: Andrea Bolognani --- diff --git a/tests/meson.build b/tests/meson.build index bc9d8ccc4c..d6b1bb2bf0 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -28,6 +28,7 @@ tests_dep = declare_dependency( ], link_args: ( libvirt_export_dynamic + + libvirt_flat_namespace + coverage_flags ), )