]> git.ipfire.org Git - thirdparty/libvirt.git/commit
tests: Pass the flat_namespace option to the linker
authorChristophe de Dinechin <dinechin@redhat.com>
Mon, 8 Aug 2022 18:14:08 +0000 (20:14 +0200)
committerAndrea Bolognani <abologna@redhat.com>
Tue, 9 Aug 2022 09:42:45 +0000 (11:42 +0200)
commitede39c1fc6904cc961334d64f4dd54d54b799c4a
tree096e6c3b2ade67d264997d3bba5777f2b1ad77c2
parentd9afab48af981a669bee7567458e26f3148aa216
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>
tests/meson.build