build-sys: add 'hmp' option
Add an option to enable/disable HMP support, default to true. The following commits are going to make --disable-hmp gradually work. Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-ID: <20260828-qemu-no-hmp-v5-49-9227de146347@redhat.com>
Marc-André Lureau committed
Aug 28, 2026 at 16:04 UTC
d0d3060658fc93a1fc2ccc44d75e51622c8af3fc
3 files changed
+8
-1
meson.build
+3
-1
@@ -243,7 +243,9 @@ have_vhost_net = have_vhost_net_kernel or have_vhost_net_user or have_vhost_net_
243
244
have_tcg = get_option('tcg').allowed() and (have_system or have_user)
245
246
-have_hmp = true
246
+have_hmp = get_option('hmp') \
247
+ .disable_auto_if(not have_system) \
248
+ .allowed()
249
have_tools = get_option('tools') \
250
.disable_auto_if(not have_system) \
251
.allowed()
meson_options.txt
+2
@@ -111,6 +111,8 @@ option('cfi', type: 'boolean', value: false,
111
description: 'Control-Flow Integrity (CFI)')
112
option('cfi_debug', type: 'boolean', value: false,
113
description: 'Verbose errors in case of CFI violation')
114
+option('hmp', type : 'feature', value : 'auto',
115
+ description: 'HMP monitor support')
116
option('multiprocess', type: 'feature', value: 'auto',
117
description: 'Out of process device emulation support')
118
option('relocatable', type : 'boolean', value : true,
scripts/meson-buildoptions.sh
+3
@@ -125,6 +125,7 @@ meson_options_help() {
125
printf "%s\n" ' gtk GTK+ user interface'
126
printf "%s\n" ' guest-agent Build QEMU Guest Agent'
127
printf "%s\n" ' guest-agent-msi Build MSI package for the QEMU Guest Agent'
128
+ printf "%s\n" ' hmp HMP monitor support'
129
printf "%s\n" ' hv-balloon hv-balloon driver (requires Glib 2.68+ GTree API)'
130
printf "%s\n" ' hvf HVF acceleration support'
131
printf "%s\n" ' iconv Font glyph conversion support'
@@ -339,6 +340,8 @@ _meson_option_parse() {
340
--disable-guest-agent-msi) printf "%s" -Dguest_agent_msi=disabled ;;
341
--enable-hexagon-idef-parser) printf "%s" -Dhexagon_idef_parser=true ;;
342
--disable-hexagon-idef-parser) printf "%s" -Dhexagon_idef_parser=false ;;
343
+ --enable-hmp) printf "%s" -Dhmp=enabled ;;
344
+ --disable-hmp) printf "%s" -Dhmp=disabled ;;
345
--enable-hv-balloon) printf "%s" -Dhv_balloon=enabled ;;
346
--disable-hv-balloon) printf "%s" -Dhv_balloon=disabled ;;
347
--enable-hvf) printf "%s" -Dhvf=enabled ;;