[PATCH] meson: fix condition for io_uring stubs

Paolo Bonzini posted 1 patch 4 years, 7 months ago
Test checkpatch passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20210712123917.463123-1-pbonzini@redhat.com
Maintainers: Paolo Bonzini <pbonzini@redhat.com>
There is a newer version of this series
stubs/meson.build | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] meson: fix condition for io_uring stubs
Posted by Paolo Bonzini 4 years, 7 months ago
CONFIG_LINUX_IO_URING is not included in config-host.mak and therefore is
not usable in "when" clauses.  Just include it unconditionally, it will
be quietly elided by the linker if liburing is not available (including
on non-Linux).

At this point, the difference between libraries that have config-host.mak
entries and those that do not is quite confusing.  The remaining ~dozen
should be converted in 6.2.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 stubs/meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/stubs/meson.build b/stubs/meson.build
index 2e79ff9f4d..42e81ab5c3 100644
--- a/stubs/meson.build
+++ b/stubs/meson.build
@@ -15,7 +15,7 @@ stub_ss.add(files('fdset.c'))
 stub_ss.add(files('fw_cfg.c'))
 stub_ss.add(files('gdbstub.c'))
 stub_ss.add(files('get-vm-name.c'))
-stub_ss.add(when: 'CONFIG_LINUX_IO_URING', if_true: files('io_uring.c'))
+stub_ss.add(files('io_uring.c'))
 stub_ss.add(files('iothread-lock.c'))
 stub_ss.add(files('isa-bus.c'))
 stub_ss.add(files('is-daemonized.c'))
-- 
2.31.1


Re: [PATCH] meson: fix condition for io_uring stubs
Posted by Alex Bennée 4 years, 7 months ago
Paolo Bonzini <pbonzini@redhat.com> writes:

> CONFIG_LINUX_IO_URING is not included in config-host.mak and therefore is
> not usable in "when" clauses.  Just include it unconditionally, it will
> be quietly elided by the linker if liburing is not available (including
> on non-Linux).
>
> At this point, the difference between libraries that have config-host.mak
> entries and those that do not is quite confusing.  The remaining ~dozen
> should be converted in 6.2.
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

Queued to pr/120721-testing-and-plugins-1, thanks.

-- 
Alex Bennée