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 <dinechin@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
This commit is contained in:
Christophe de Dinechin 2022-08-08 20:14:08 +02:00 committed by Andrea Bolognani
parent d9afab48af
commit ede39c1fc6

View File

@ -28,6 +28,7 @@ tests_dep = declare_dependency(
],
link_args: (
libvirt_export_dynamic
+ libvirt_flat_namespace
+ coverage_flags
),
)