tests/meson: fix mock library link on MacOS

MacOS can not pre-load modules, so mock libraries must be built
as shared libraries (without asneeded striping, and undefined
symbols allowed).

Signed-off-by: Scott Shambarger <scott-libvirt@shambarger.net>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Scott Shambarger 2020-08-28 12:35:01 -07:00 committed by Ján Tomko
parent e603fcf537
commit 234a0ea306

View File

@ -120,9 +120,13 @@ if conf.has('WITH_SECDRIVER_SELINUX')
endif
foreach mock : mock_libs
shared_module(
shared_library(
mock['name'],
mock.get('sources', [ '@0@.c'.format(mock['name']) ]),
override_options: [
'b_asneeded=false',
'b_lundef=false',
],
dependencies: [
tests_dep,
mock.get('deps', []),