summaryrefslogtreecommitdiff
path: root/monitor
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2026-08-28 16:04:42 +0400
committerMarc-André Lureau <marcandre.lureau@redhat.com>2026-08-29 12:07:45 +0400
commit34c5de5c6d6049b7cd0d475a32da8760f35c0ab5 (patch)
treeceef6b37f0e49870cf328dfb9c05d610e519916e /monitor
parentbe86cd220ad1bbe4fad11010580ae871c954df76 (diff)
downloadqemu-34c5de5c6d6049b7cd0d475a32da8760f35c0ab5.tar.gz
qemu-34c5de5c6d6049b7cd0d475a32da8760f35c0ab5.zip
build-sys: make HMP source files conditional on have_hmp
Exclude all *-hmp-cmds.c files and HMP-only source files from the build when HMP is disabled. Also conditionalise the hmp-commands.hx header generation and the test-hmp qtest. Acked-by: Dr. David Alan Gilbert <dave@treblig.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-ID: <20260828-qemu-no-hmp-v5-45-9227de146347@redhat.com>
Diffstat (limited to 'monitor')
-rw-r--r--monitor/hmp.c2
-rw-r--r--monitor/meson.build9
2 files changed, 7 insertions, 4 deletions
diff --git a/monitor/hmp.c b/monitor/hmp.c
index 3c70adcd35..10bcbe2a33 100644
--- a/monitor/hmp.c
+++ b/monitor/hmp.c
@@ -1731,9 +1731,7 @@ static int get_monitor_def(MonitorHMP *hmp, int64_t *pval, const char *name)
if (cs == NULL) {
return -1;
}
-#ifdef CONFIG_HMP
md = cs->cc->sysemu_ops->monitor_defs;
-#endif
if (md == NULL) {
return -1;
}
diff --git a/monitor/meson.build b/monitor/meson.build
index 4c58dd148c..f67e0291a4 100644
--- a/monitor/meson.build
+++ b/monitor/meson.build
@@ -2,8 +2,13 @@ qmp_ss.add(files('monitor.c', 'qmp.c', 'qmp-cmds-control.c'))
system_ss.add(files(
'fds.c',
- 'hmp-cmds.c',
- 'hmp.c',
'qemu-config-qmp.c',
'qmp-cmds.c',
))
+
+if have_hmp
+ system_ss.add(files(
+ 'hmp-cmds.c',
+ 'hmp.c',
+ ))
+endif