From 064b3a276df3984cbdf9c9d95e0914927554afd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A1n=20Tomko?= Date: Mon, 20 Jan 2025 10:14:03 +0100 Subject: [PATCH] meson: error out when ch driver is requested but unsupported MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ján Tomko Reviewed-by: Pavel Hrdina --- 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