On 8/28/20 4:35 PM, Scott Shambarger wrote:
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@xxxxxxxxxxxxxx>
---
Given that this is a MacOS specific limitation it's not a good idea
to force it on the common code for everyone else.
The 'meson.build' file in the project root uses, in line 1727:
host_machine.system() != 'darwin'
To identify the building system as MacOS. IMO you should use an
"if host_machine.system() != 'darwin'" inside the 'foreach' loop
below to do whatever it is necessary for MacOS, leave the rest as
is.
Thanks,
DHB
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@.c'.format(mock['name']) ]),
+ override_options: [
+ 'b_asneeded=false',
+ 'b_lundef=false',
+ ],
dependencies: [
tests_dep,
mock.get('deps', []),