* [PATCH 1/5] meson: remove unnecessary reference to libm
2024-05-24 16:20 [PATCH 0/5] meson: small cleanups Paolo Bonzini
@ 2024-05-24 16:20 ` Paolo Bonzini
2024-05-24 16:20 ` [PATCH 2/5] meson: remove unnecessary dependency Paolo Bonzini
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Paolo Bonzini @ 2024-05-24 16:20 UTC (permalink / raw)
To: qemu-devel
libm is linked into all targets via libqemuutil, no need to specify it
explicitly.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
block/meson.build | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block/meson.build b/block/meson.build
index e1f03fd773e..8993055c75e 100644
--- a/block/meson.build
+++ b/block/meson.build
@@ -110,7 +110,7 @@ foreach m : [
[blkio, 'blkio', files('blkio.c')],
[curl, 'curl', files('curl.c')],
[glusterfs, 'gluster', files('gluster.c')],
- [libiscsi, 'iscsi', [files('iscsi.c'), libm]],
+ [libiscsi, 'iscsi', files('iscsi.c')],
[libnfs, 'nfs', files('nfs.c')],
[libssh, 'ssh', files('ssh.c')],
[rbd, 'rbd', files('rbd.c')],
--
2.45.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/5] meson: remove unnecessary dependency
2024-05-24 16:20 [PATCH 0/5] meson: small cleanups Paolo Bonzini
2024-05-24 16:20 ` [PATCH 1/5] meson: remove unnecessary reference to libm Paolo Bonzini
@ 2024-05-24 16:20 ` Paolo Bonzini
2024-05-24 16:20 ` [PATCH 3/5] tcg: include dependencies in static_library() Paolo Bonzini
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Paolo Bonzini @ 2024-05-24 16:20 UTC (permalink / raw)
To: qemu-devel
The dbus_display1_dep is not really used since all occurrences also
request gio independently. Just list the generated sources and drop
dbus_display1_dep.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
audio/meson.build | 4 ++--
tests/qtest/meson.build | 2 +-
ui/meson.build | 5 ++---
3 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/audio/meson.build b/audio/meson.build
index 608f35e6af7..59f0a431d51 100644
--- a/audio/meson.build
+++ b/audio/meson.build
@@ -30,8 +30,8 @@ endforeach
if dbus_display
module_ss = ss.source_set()
- module_ss.add(when: [gio, dbus_display1_dep, pixman],
- if_true: files('dbusaudio.c'))
+ module_ss.add(when: [gio, pixman],
+ if_true: [dbus_display1, files('dbusaudio.c')])
audio_modules += {'dbus': module_ss}
endif
diff --git a/tests/qtest/meson.build b/tests/qtest/meson.build
index 86293051dce..b98fae6a6dd 100644
--- a/tests/qtest/meson.build
+++ b/tests/qtest/meson.build
@@ -354,7 +354,7 @@ if vnc.found()
endif
if dbus_display
- qtests += {'dbus-display-test': [dbus_display1_dep, gio]}
+ qtests += {'dbus-display-test': [dbus_display1, gio]}
endif
qtest_executables = {}
diff --git a/ui/meson.build b/ui/meson.build
index 5d89986b0ee..cfbf29428df 100644
--- a/ui/meson.build
+++ b/ui/meson.build
@@ -91,8 +91,7 @@ if dbus_display
'--interface-prefix', 'org.qemu.',
'--c-namespace', 'QemuDBus',
'--generate-c-code', '@BASENAME@'])
- dbus_display1_dep = declare_dependency(sources: dbus_display1, dependencies: gio)
- dbus_ss.add(when: [gio, dbus_display1_dep],
+ dbus_ss.add(when: gio,
if_true: [files(
'dbus-chardev.c',
'dbus-clipboard.c',
@@ -100,7 +99,7 @@ if dbus_display
'dbus-error.c',
'dbus-listener.c',
'dbus.c',
- ), opengl, gbm, pixman])
+ ), opengl, gbm, pixman, dbus_display1])
ui_modules += {'dbus' : dbus_ss}
endif
--
2.45.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 3/5] tcg: include dependencies in static_library()
2024-05-24 16:20 [PATCH 0/5] meson: small cleanups Paolo Bonzini
2024-05-24 16:20 ` [PATCH 1/5] meson: remove unnecessary reference to libm Paolo Bonzini
2024-05-24 16:20 ` [PATCH 2/5] meson: remove unnecessary dependency Paolo Bonzini
@ 2024-05-24 16:20 ` Paolo Bonzini
2024-05-24 16:20 ` [PATCH 4/5] meson: do not query modules before they are processed Paolo Bonzini
2024-05-24 16:20 ` [PATCH 5/5] migration: remove unnecessary zlib dependency Paolo Bonzini
4 siblings, 0 replies; 6+ messages in thread
From: Paolo Bonzini @ 2024-05-24 16:20 UTC (permalink / raw)
To: qemu-devel
This ensures that for example libffi can be reached even if it is not
in /usr/include.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
tcg/meson.build | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/tcg/meson.build b/tcg/meson.build
index 8251589fd4e..ffbe754d8b3 100644
--- a/tcg/meson.build
+++ b/tcg/meson.build
@@ -32,19 +32,19 @@ tcg_ss = tcg_ss.apply({})
libtcg_user = static_library('tcg_user',
tcg_ss.sources() + genh,
name_suffix: 'fa',
+ dependencies: tcg_ss.dependencies(),
c_args: '-DCONFIG_USER_ONLY',
build_by_default: false)
-tcg_user = declare_dependency(link_with: libtcg_user,
- dependencies: tcg_ss.dependencies())
+tcg_user = declare_dependency(link_with: libtcg_user)
user_ss.add(tcg_user)
libtcg_system = static_library('tcg_system',
tcg_ss.sources() + genh,
name_suffix: 'fa',
+ dependencies: tcg_ss.dependencies(),
c_args: '-DCONFIG_SOFTMMU',
build_by_default: false)
-tcg_system = declare_dependency(link_with: libtcg_system,
- dependencies: tcg_ss.dependencies())
+tcg_system = declare_dependency(link_with: libtcg_system)
system_ss.add(tcg_system)
--
2.45.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 4/5] meson: do not query modules before they are processed
2024-05-24 16:20 [PATCH 0/5] meson: small cleanups Paolo Bonzini
` (2 preceding siblings ...)
2024-05-24 16:20 ` [PATCH 3/5] tcg: include dependencies in static_library() Paolo Bonzini
@ 2024-05-24 16:20 ` Paolo Bonzini
2024-05-24 16:20 ` [PATCH 5/5] migration: remove unnecessary zlib dependency Paolo Bonzini
4 siblings, 0 replies; 6+ messages in thread
From: Paolo Bonzini @ 2024-05-24 16:20 UTC (permalink / raw)
To: qemu-devel
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
block/meson.build | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block/meson.build b/block/meson.build
index 8993055c75e..158dc3b89db 100644
--- a/block/meson.build
+++ b/block/meson.build
@@ -119,7 +119,7 @@ foreach m : [
module_ss = ss.source_set()
module_ss.add(when: m[0], if_true: m[2])
if enable_modules
- modsrc += module_ss.all_sources()
+ modsrc += m[2]
endif
block_modules += {m[1] : module_ss}
endif
--
2.45.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 5/5] migration: remove unnecessary zlib dependency
2024-05-24 16:20 [PATCH 0/5] meson: small cleanups Paolo Bonzini
` (3 preceding siblings ...)
2024-05-24 16:20 ` [PATCH 4/5] meson: do not query modules before they are processed Paolo Bonzini
@ 2024-05-24 16:20 ` Paolo Bonzini
4 siblings, 0 replies; 6+ messages in thread
From: Paolo Bonzini @ 2024-05-24 16:20 UTC (permalink / raw)
To: qemu-devel
zlib code is only used by the emulators, not by the tests.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
meson.build | 2 +-
migration/dirtyrate.c | 1 -
migration/qemu-file.c | 1 -
migration/meson.build | 2 +-
4 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 7fd82b5f48c..63866071445 100644
--- a/meson.build
+++ b/meson.build
@@ -3696,7 +3696,7 @@ libmigration = static_library('migration', sources: migration_files + genh,
name_suffix: 'fa',
build_by_default: false)
migration = declare_dependency(link_with: libmigration,
- dependencies: [zlib, qom, io])
+ dependencies: [qom, io])
system_ss.add(migration)
block_ss = block_ss.apply({})
diff --git a/migration/dirtyrate.c b/migration/dirtyrate.c
index d02d70b7b4b..1d9db812990 100644
--- a/migration/dirtyrate.c
+++ b/migration/dirtyrate.c
@@ -12,7 +12,6 @@
#include "qemu/osdep.h"
#include "qemu/error-report.h"
-#include <zlib.h>
#include "hw/core/cpu.h"
#include "qapi/error.h"
#include "exec/ramblock.h"
diff --git a/migration/qemu-file.c b/migration/qemu-file.c
index 9ccbbb00991..b6d2f588bd7 100644
--- a/migration/qemu-file.c
+++ b/migration/qemu-file.c
@@ -22,7 +22,6 @@
* THE SOFTWARE.
*/
#include "qemu/osdep.h"
-#include <zlib.h>
#include "qemu/madvise.h"
#include "qemu/error-report.h"
#include "qemu/iov.h"
diff --git a/migration/meson.build b/migration/meson.build
index 8815f808374..bdc3244bce0 100644
--- a/migration/meson.build
+++ b/migration/meson.build
@@ -29,7 +29,7 @@ system_ss.add(files(
'socket.c',
'tls.c',
'threadinfo.c',
-), gnutls)
+), gnutls, zlib)
if get_option('replication').allowed()
system_ss.add(files('colo-failover.c', 'colo.c'))
--
2.45.1
^ permalink raw reply related [flat|nested] 6+ messages in thread