diff mbox series

trace: Do not try to include QMP commands in user emulation binaries

Message ID 20221220150417.26751-1-philmd@linaro.org (mailing list archive)
State New, archived
Headers show
Series trace: Do not try to include QMP commands in user emulation binaries | expand

Commit Message

Philippe Mathieu-Daudé Dec. 20, 2022, 3:04 p.m. UTC
QMP is not available on user emulation; there is not monitor.
Besides, since commit a0e61807a3 ("qapi: Remove QMP events
and commands from user-mode builds") we don't generate the
qapi-commands-trace.h header in a user-emulation-only build.

Remove the QMP trace commands from qemu-user binaries.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 trace/meson.build | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Philippe Mathieu-Daudé Dec. 20, 2022, 3:06 p.m. UTC | #1
On 20/12/22 16:04, Philippe Mathieu-Daudé wrote:
> QMP is not available on user emulation; there is not monitor.
> Besides, since commit a0e61807a3 ("qapi: Remove QMP events
> and commands from user-mode builds") we don't generate the
> qapi-commands-trace.h header in a user-emulation-only build.
> 
> Remove the QMP trace commands from qemu-user binaries.
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>   trace/meson.build | 4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/trace/meson.build b/trace/meson.build
> index 26b54714d5..4385afbff0 100644
> --- a/trace/meson.build
> +++ b/trace/meson.build
> @@ -88,4 +88,6 @@ if 'ftrace' in get_option('trace_backends')
>     trace_ss.add(files('ftrace.c'))
>   endif
>   trace_ss.add(files('control.c'))
> -trace_ss.add(files('qmp.c'))
> +if have_system or have_tools or have_ga

Maybe this pattern deserves adding a variable similar to:

   have_monitor = have_system or have_tools or have_ga

> +  trace_ss.add(files('qmp.c'))
> +endif
Richard Henderson Dec. 21, 2022, 1:04 a.m. UTC | #2
On 12/20/22 07:04, Philippe Mathieu-Daudé wrote:
> QMP is not available on user emulation; there is not monitor.
> Besides, since commit a0e61807a3 ("qapi: Remove QMP events
> and commands from user-mode builds") we don't generate the
> qapi-commands-trace.h header in a user-emulation-only build.
> 
> Remove the QMP trace commands from qemu-user binaries.
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>   trace/meson.build | 4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)

Acked-by: Richard Henderson <richard.henderson@linaro.org>


r~

> 
> diff --git a/trace/meson.build b/trace/meson.build
> index 26b54714d5..4385afbff0 100644
> --- a/trace/meson.build
> +++ b/trace/meson.build
> @@ -88,4 +88,6 @@ if 'ftrace' in get_option('trace_backends')
>     trace_ss.add(files('ftrace.c'))
>   endif
>   trace_ss.add(files('control.c'))
> -trace_ss.add(files('qmp.c'))
> +if have_system or have_tools or have_ga
> +  trace_ss.add(files('qmp.c'))
> +endif
diff mbox series

Patch

diff --git a/trace/meson.build b/trace/meson.build
index 26b54714d5..4385afbff0 100644
--- a/trace/meson.build
+++ b/trace/meson.build
@@ -88,4 +88,6 @@  if 'ftrace' in get_option('trace_backends')
   trace_ss.add(files('ftrace.c'))
 endif
 trace_ss.add(files('control.c'))
-trace_ss.add(files('qmp.c'))
+if have_system or have_tools or have_ga
+  trace_ss.add(files('qmp.c'))
+endif