[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 13/30] configure, meson: move block layer options to meson_options
From: |
Paolo Bonzini |
Subject: |
[PULL 13/30] configure, meson: move block layer options to meson_options.txt |
Date: |
Tue, 15 Feb 2022 10:32:06 +0100 |
Unlike image formats, these also require an entry in config-host.h.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
block/meson.build | 4 +++-
configure | 20 --------------------
meson.build | 11 ++++++++---
meson_options.txt | 4 ++++
migration/meson.build | 4 +++-
scripts/meson-buildoptions.sh | 7 +++++++
tests/unit/meson.build | 2 +-
7 files changed, 26 insertions(+), 26 deletions(-)
diff --git a/block/meson.build b/block/meson.build
index 4afde2ebf8..8a1ce58c9c 100644
--- a/block/meson.build
+++ b/block/meson.build
@@ -80,7 +80,9 @@ block_ss.add(when: 'CONFIG_WIN32', if_true:
files('file-win32.c', 'win32-aio.c')
block_ss.add(when: 'CONFIG_POSIX', if_true: [files('file-posix.c'), coref,
iokit])
block_ss.add(when: libiscsi, if_true: files('iscsi-opts.c'))
block_ss.add(when: 'CONFIG_LINUX', if_true: files('nvme.c'))
-block_ss.add(when: 'CONFIG_REPLICATION', if_true: files('replication.c'))
+if not get_option('replication').disabled()
+ block_ss.add(files('replication.c'))
+endif
block_ss.add(when: libaio, if_true: files('linux-aio.c'))
block_ss.add(when: linux_io_uring, if_true: files('io_uring.c'))
diff --git a/configure b/configure
index 4ee1567419..1a15e2325e 100755
--- a/configure
+++ b/configure
@@ -329,8 +329,6 @@ coroutine=""
coroutine_pool="$default_feature"
debug_stack_usage="no"
tls_priority="NORMAL"
-live_block_migration=${default_feature:-yes}
-replication=${default_feature:-yes}
debug_mutex="no"
plugins="$default_feature"
rng_none="no"
@@ -1028,14 +1026,6 @@ for opt do
;;
--disable-pvrdma) pvrdma="no"
;;
- --disable-live-block-migration) live_block_migration="no"
- ;;
- --enable-live-block-migration) live_block_migration="yes"
- ;;
- --disable-replication) replication="no"
- ;;
- --enable-replication) replication="yes"
- ;;
--disable-vhost-user) vhost_user="no"
;;
--enable-vhost-user) vhost_user="yes"
@@ -1329,9 +1319,7 @@ cat << EOF
vhost-kernel vhost kernel backend support
vhost-user vhost-user backend support
vhost-vdpa vhost-vdpa kernel backend support
- live-block-migration Block migration in the main migration stream
coroutine-pool coroutine freelist (better performance)
- replication replication support
opengl opengl support
qom-cast-debug cast debugging support
tools build qemu-io, qemu-nbd and qemu-img tools
@@ -3195,10 +3183,6 @@ if test "$cmpxchg128" = "yes" ; then
echo "CONFIG_CMPXCHG128=y" >> $config_host_mak
fi
-if test "$live_block_migration" = "yes" ; then
- echo "CONFIG_LIVE_BLOCK_MIGRATION=y" >> $config_host_mak
-fi
-
if test "$rdma" = "yes" ; then
echo "CONFIG_RDMA=y" >> $config_host_mak
echo "RDMA_LIBS=$rdma_libs" >> $config_host_mak
@@ -3208,10 +3192,6 @@ if test "$pvrdma" = "yes" ; then
echo "CONFIG_PVRDMA=y" >> $config_host_mak
fi
-if test "$replication" = "yes" ; then
- echo "CONFIG_REPLICATION=y" >> $config_host_mak
-fi
-
if test "$debug_mutex" = "yes" ; then
echo "CONFIG_DEBUG_MUTEX=y" >> $config_host_mak
fi
diff --git a/meson.build b/meson.build
index 38e3ea46e1..031bbf468c 100644
--- a/meson.build
+++ b/meson.build
@@ -1539,6 +1539,9 @@ config_host_data.set_quoted('CONFIG_HOST_DSOSUF',
host_dsosuf)
config_host_data.set('HAVE_HOST_BLOCK_DEVICE', have_host_block_device)
config_host_data.set('HOST_WORDS_BIGENDIAN', host_machine.endian() == 'big')
+config_host_data.set('CONFIG_LIVE_BLOCK_MIGRATION',
get_option('live_block_migration').allowed())
+config_host_data.set('CONFIG_REPLICATION',
get_option('live_block_migration').allowed())
+
# has_header
config_host_data.set('CONFIG_EPOLL', cc.has_header('sys/epoll.h'))
config_host_data.set('CONFIG_LINUX_MAGIC_H', cc.has_header('linux/magic.h'))
@@ -2684,7 +2687,9 @@ if have_block
'job.c',
'qemu-io-cmds.c',
))
- block_ss.add(when: 'CONFIG_REPLICATION', if_true: files('replication.c'))
+ if config_host_data.get('CONFIG_REPLICATION')
+ block_ss.add(files('replication.c'))
+ endif
subdir('nbd')
subdir('scsi')
@@ -3461,8 +3466,8 @@ if have_block
summary_info += {'Use block whitelist in tools':
config_host.has_key('CONFIG_BDRV_WHITELIST_TOOLS')}
summary_info += {'VirtFS support': have_virtfs}
summary_info += {'build virtiofs daemon': have_virtiofsd}
- summary_info += {'Live block migration':
config_host.has_key('CONFIG_LIVE_BLOCK_MIGRATION')}
- summary_info += {'replication support':
config_host.has_key('CONFIG_REPLICATION')}
+ summary_info += {'Live block migration':
config_host_data.get('CONFIG_LIVE_BLOCK_MIGRATION')}
+ summary_info += {'replication support':
config_host_data.get('CONFIG_REPLICATION')}
summary_info += {'bochs support': get_option('bochs').allowed()}
summary_info += {'cloop support': get_option('cloop').allowed()}
summary_info += {'dmg support': get_option('dmg').allowed()}
diff --git a/meson_options.txt b/meson_options.txt
index aef951eba1..3bfaa77805 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -222,6 +222,10 @@ option('fdt', type: 'combo', value: 'auto',
option('selinux', type: 'feature', value: 'auto',
description: 'SELinux support in qemu-nbd')
+option('live_block_migration', type: 'feature', value: 'auto',
+ description: 'block migration in the main migration stream')
+option('replication', type: 'feature', value: 'auto',
+ description: 'replication support')
option('bochs', type: 'feature', value: 'auto',
description: 'bochs image format support')
option('cloop', type: 'feature', value: 'auto',
diff --git a/migration/meson.build b/migration/meson.build
index f8714dcb15..8b5ca5c047 100644
--- a/migration/meson.build
+++ b/migration/meson.build
@@ -28,7 +28,9 @@ softmmu_ss.add(files(
), gnutls)
softmmu_ss.add(when: ['CONFIG_RDMA', rdma], if_true: files('rdma.c'))
-softmmu_ss.add(when: 'CONFIG_LIVE_BLOCK_MIGRATION', if_true: files('block.c'))
+if get_option('live_block_migration').allowed()
+ softmmu_ss.add(files('block.c'))
+endif
softmmu_ss.add(when: zstd, if_true: files('multifd-zstd.c'))
specific_ss.add(when: 'CONFIG_SOFTMMU',
diff --git a/scripts/meson-buildoptions.sh b/scripts/meson-buildoptions.sh
index 50a985abec..ffd712936d 100644
--- a/scripts/meson-buildoptions.sh
+++ b/scripts/meson-buildoptions.sh
@@ -66,6 +66,8 @@ meson_options_help() {
printf "%s\n" ' libusb libusb support for USB passthrough'
printf "%s\n" ' linux-aio Linux AIO support'
printf "%s\n" ' linux-io-uring Linux io_uring support'
+ printf "%s\n" ' live-block-migration'
+ printf "%s\n" ' block migration in the main migration
stream'
printf "%s\n" ' lzfse lzfse support for DMG images'
printf "%s\n" ' lzo lzo compression support'
printf "%s\n" ' malloc-trim enable libc malloc_trim() for memory
optimization'
@@ -82,6 +84,7 @@ meson_options_help() {
printf "%s\n" ' qcow1 qcow1 image format support'
printf "%s\n" ' qed qed image format support'
printf "%s\n" ' rbd Ceph block device driver'
+ printf "%s\n" ' replication replication support'
printf "%s\n" ' sdl SDL user interface'
printf "%s\n" ' sdl-image SDL Image support for icons'
printf "%s\n" ' seccomp seccomp support'
@@ -217,6 +220,8 @@ _meson_option_parse() {
--disable-linux-aio) printf "%s" -Dlinux_aio=disabled ;;
--enable-linux-io-uring) printf "%s" -Dlinux_io_uring=enabled ;;
--disable-linux-io-uring) printf "%s" -Dlinux_io_uring=disabled ;;
+ --enable-live-block-migration) printf "%s" -Dlive_block_migration=enabled
;;
+ --disable-live-block-migration) printf "%s"
-Dlive_block_migration=disabled ;;
--enable-lzfse) printf "%s" -Dlzfse=enabled ;;
--disable-lzfse) printf "%s" -Dlzfse=disabled ;;
--enable-lzo) printf "%s" -Dlzo=enabled ;;
@@ -250,6 +255,8 @@ _meson_option_parse() {
--disable-qed) printf "%s" -Dqed=disabled ;;
--enable-rbd) printf "%s" -Drbd=enabled ;;
--disable-rbd) printf "%s" -Drbd=disabled ;;
+ --enable-replication) printf "%s" -Dreplication=enabled ;;
+ --disable-replication) printf "%s" -Dreplication=disabled ;;
--enable-sdl) printf "%s" -Dsdl=enabled ;;
--disable-sdl) printf "%s" -Dsdl=disabled ;;
--enable-sdl-image) printf "%s" -Dsdl_image=enabled ;;
diff --git a/tests/unit/meson.build b/tests/unit/meson.build
index 64a5e7bfde..0959061faf 100644
--- a/tests/unit/meson.build
+++ b/tests/unit/meson.build
@@ -106,7 +106,7 @@ if have_block
if 'CONFIG_POSIX' in config_host
tests += {'test-image-locking': [testblock]}
endif
- if 'CONFIG_REPLICATION' in config_host
+ if config_host_data.get('CONFIG_REPLICATION')
tests += {'test-replication': [testblock]}
endif
if nettle.found() or gcrypt.found()
--
2.34.1
- [PULL 02/30] memory: Fix qemu crash on starting dirty log twice with stopped VM, (continued)
- [PULL 02/30] memory: Fix qemu crash on starting dirty log twice with stopped VM, Paolo Bonzini, 2022/02/15
- [PULL 06/30] configure, meson: move AVX tests to meson, Paolo Bonzini, 2022/02/15
- [PULL 08/30] configure, meson: move AF_ALG test to meson, Paolo Bonzini, 2022/02/15
- [PULL 09/30] configure, meson: move libnuma detection to meson, Paolo Bonzini, 2022/02/15
- [PULL 10/30] configure, meson: move TPM check to meson, Paolo Bonzini, 2022/02/15
- [PULL 07/30] configure, meson: move membarrier test to meson, Paolo Bonzini, 2022/02/15
- [PULL 12/30] configure, meson: move image format options to meson_options.txt, Paolo Bonzini, 2022/02/15
- [PULL 11/30] configure, meson: cleanup qemu-ga libraries, Paolo Bonzini, 2022/02/15
- [PULL 15/30] configure, meson: move some default-disabled options to meson_options.txt, Paolo Bonzini, 2022/02/15
- [PULL 14/30] meson: define qemu_cflags/qemu_ldflags, Paolo Bonzini, 2022/02/15
- [PULL 13/30] configure, meson: move block layer options to meson_options.txt,
Paolo Bonzini <=
- [PULL 16/30] configure, meson: move coroutine options to meson_options.txt, Paolo Bonzini, 2022/02/15
- [PULL 21/30] qga/vss-win32: fix midl arguments, Paolo Bonzini, 2022/02/15
- [PULL 20/30] configure, meson: move OpenGL check to meson, Paolo Bonzini, 2022/02/15
- [PULL 17/30] configure, meson: move smbd options to meson_options.txt, Paolo Bonzini, 2022/02/15
- [PULL 18/30] configure, meson: move guest-agent, tools to meson, Paolo Bonzini, 2022/02/15
- [PULL 22/30] meson: drop --with-win-sdk, Paolo Bonzini, 2022/02/15
- [PULL 25/30] configure, meson: replace VSS SDK checks and options with --enable-vss-sdk, Paolo Bonzini, 2022/02/15
- [PULL 28/30] meson: require dynamic linking for VSS support, Paolo Bonzini, 2022/02/15
- [PULL 27/30] qga/vss-win32: require widl/midl, remove pre-built TLB file, Paolo Bonzini, 2022/02/15
- [PULL 19/30] meson: refine check for whether to look for virglrenderer, Paolo Bonzini, 2022/02/15