]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
meson: error out when ch driver is requested but unsupported
authorJán Tomko <jtomko@redhat.com>
Mon, 20 Jan 2025 09:14:03 +0000 (10:14 +0100)
committerJán Tomko <jtomko@redhat.com>
Tue, 21 Jan 2025 08:50:36 +0000 (09:50 +0100)
Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
meson.build

index 16ec3ba7e2f1566d6797294c765eef9058ec8cfc..1b0b71790154f1a090f5895ec3d3fbeab9f67963 100644 (file)
@@ -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