[libvirt PATCH v2 0/2] meson: error out when ch driver is requested but unsupported

v1 forgot to define the 'use_ch' variable in some corner case v2 also disables the build for mingw Ján Tomko (2): meson: error out when ch driver is requested but unsupported libvirt.spec: do not build ch driver on mingw libvirt.spec.in | 1 + meson.build | 11 +++++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) -- 2.47.0

Signed-off-by: Ján Tomko <jtomko@redhat.com> --- meson.build | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/meson.build b/meson.build index 16ec3ba7e2..1b0b717901 100644 --- a/meson.build +++ b/meson.build @@ -1582,8 +1582,15 @@ elif get_option('driver_lxc').enabled() error('linux and remote_driver are required for LXC') endif -if not get_option('driver_ch').disabled() and host_machine.system() == 'linux' and (host_machine.cpu_family() == 'x86_64' or host_machine.cpu_family() == 'aarch64') - use_ch = true +if not get_option('driver_ch').disabled() + if host_machine.system() == 'linux' and (host_machine.cpu_family() == 'x86_64' or host_machine.cpu_family() == 'aarch64') + use_ch = true + else + use_ch = false + if get_option('driver_ch').enabled() + error('linux on x86_64 or aarch64 is required to build Cloud-Hypervisor driver') + endif + endif if not conf.has('WITH_LIBVIRTD') use_ch = false -- 2.47.0

Signed-off-by: Ján Tomko <jtomko@redhat.com> --- libvirt.spec.in | 1 + 1 file changed, 1 insertion(+) diff --git a/libvirt.spec.in b/libvirt.spec.in index f513ca9173..6658f22433 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -1451,6 +1451,7 @@ export SOURCE_DATE_EPOCH=$(stat --printf='%Y' %{_specdir}/libvirt.spec) -Dblkid=disabled \ -Dcapng=disabled \ -Ddriver_bhyve=disabled \ + -Ddriver_ch=disabled \ -Ddriver_hyperv=disabled \ -Ddriver_interface=disabled \ -Ddriver_libvirtd=disabled \ -- 2.47.0

On Mon, Jan 20, 2025 at 06:49:48PM +0100, Ján Tomko wrote:
v1 forgot to define the 'use_ch' variable in some corner case
v2 also disables the build for mingw
Ján Tomko (2): meson: error out when ch driver is requested but unsupported libvirt.spec: do not build ch driver on mingw
libvirt.spec.in | 1 + meson.build | 11 +++++++++-- 2 files changed, 10 insertions(+), 2 deletions(-)
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
participants (2)
-
Ján Tomko
-
Pavel Hrdina