[PATCH] tests/meson: fix mock library link on MacOS

Scott Shambarger scott-libvirt at shambarger.net
Fri Aug 28 19:35:01 UTC 2020


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 at shambarger.net>
---
 tests/meson.build | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/tests/meson.build b/tests/meson.build
index b5f6e2267a..d7476452ba 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -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 at .c'.format(mock['name']) ]),
+    override_options: [
+     'b_asneeded=false',
+     'b_lundef=false',
+    ],
     dependencies: [
       tests_dep,
       mock.get('deps', []),
-- 
2.24.3 (Apple Git-128)





More information about the libvir-list mailing list