From ede39c1fc6904cc961334d64f4dd54d54b799c4a Mon Sep 17 00:00:00 2001 From: Christophe de Dinechin Date: Mon, 8 Aug 2022 20:14:08 +0200 Subject: [PATCH] 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 --- tests/meson.build | 1 + 1 file changed, 1 insertion(+) 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 ), )