Add an option to enable/disable HMP support, default to true. The
following commits are going to make --disable-hmp gradually working.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
meson.build | 4 ++++
meson_options.txt | 2 ++
scripts/meson-buildoptions.sh | 3 +++
3 files changed, 9 insertions(+)
diff --git a/meson.build b/meson.build
index 70613bf4afc..e83cfe56cf3 100644
--- a/meson.build
+++ b/meson.build
@@ -247,6 +247,9 @@ have_vhost_net = have_vhost_net_kernel or have_vhost_net_user or have_vhost_net_
have_tcg = get_option('tcg').allowed() and (have_system or have_user)
+have_hmp = get_option('hmp') \
+ .disable_auto_if(not have_system) \
+ .allowed()
have_tools = get_option('tools') \
.disable_auto_if(not have_system) \
.allowed()
@@ -2256,6 +2259,7 @@ endif
config_host_data = configuration_data()
config_host_data.set('CONFIG_HAVE_RUST', have_rust)
+config_host_data.set('CONFIG_HMP', have_hmp)
audio_drivers_selected = []
if have_system
audio_drivers_available = {
diff --git a/meson_options.txt b/meson_options.txt
index a07cb47d35e..d8f59cf92ca 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -111,6 +111,8 @@ option('cfi', type: 'boolean', value: false,
description: 'Control-Flow Integrity (CFI)')
option('cfi_debug', type: 'boolean', value: false,
description: 'Verbose errors in case of CFI violation')
+option('hmp', type : 'feature', value : 'auto',
+ description: 'HMP monitor support')
option('multiprocess', type: 'feature', value: 'auto',
description: 'Out of process device emulation support')
option('relocatable', type : 'boolean', value : true,
diff --git a/scripts/meson-buildoptions.sh b/scripts/meson-buildoptions.sh
index c003985047c..5a67e59a167 100644
--- a/scripts/meson-buildoptions.sh
+++ b/scripts/meson-buildoptions.sh
@@ -125,6 +125,7 @@ meson_options_help() {
printf "%s\n" ' gtk GTK+ user interface'
printf "%s\n" ' guest-agent Build QEMU Guest Agent'
printf "%s\n" ' guest-agent-msi Build MSI package for the QEMU Guest Agent'
+ printf "%s\n" ' hmp HMP monitor support'
printf "%s\n" ' hv-balloon hv-balloon driver (requires Glib 2.68+ GTree API)'
printf "%s\n" ' hvf HVF acceleration support'
printf "%s\n" ' iconv Font glyph conversion support'
@@ -339,6 +340,8 @@ _meson_option_parse() {
--disable-guest-agent-msi) printf "%s" -Dguest_agent_msi=disabled ;;
--enable-hexagon-idef-parser) printf "%s" -Dhexagon_idef_parser=true ;;
--disable-hexagon-idef-parser) printf "%s" -Dhexagon_idef_parser=false ;;
+ --enable-hmp) printf "%s" -Dhmp=enabled ;;
+ --disable-hmp) printf "%s" -Dhmp=disabled ;;
--enable-hv-balloon) printf "%s" -Dhv_balloon=enabled ;;
--disable-hv-balloon) printf "%s" -Dhv_balloon=disabled ;;
--enable-hvf) printf "%s" -Dhvf=enabled ;;
--
2.54.0