]> www.infradead.org Git - users/dwmw2/qemu.git/commitdiff
stubs: avoid duplicate symbols in libqemuutil.a
authorPaolo Bonzini <pbonzini@redhat.com>
Mon, 21 Oct 2024 16:07:16 +0000 (18:07 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 30 Oct 2024 15:30:56 +0000 (16:30 +0100)
qapi_event_send_device_deleted is always included (together with the
rest of QAPI) in libqemuutil.a if either system-mode emulation or tools
are being built, and in that case the stub causes a duplicate symbol
to appear in libqemuutil.a.

Add the symbol only if events are not being requested.

Cc: qemu-stable@nongnu.org
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Tested-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
stubs/meson.build

index 772a3e817df2c87c1b0e1b134afebd2fa876d387..e91614a874dc14ed96bd3e574005d8ab53b0c2a9 100644 (file)
@@ -55,7 +55,12 @@ endif
 if have_user
   # Symbols that are used by hw/core.
   stub_ss.add(files('cpu-synchronize-state.c'))
-  stub_ss.add(files('qdev.c'))
+
+  # Stubs for QAPI events.  Those can always be included in the build, but
+  # they are not built at all for --disable-system --disable-tools builds.
+  if not (have_system or have_tools)
+    stub_ss.add(files('qdev.c'))
+  endif
 endif
 
 if have_system