All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Subject: [PULL 01/13] meson: allow optional dependencies for block modules
Date: Fri,  4 Jun 2021 17:17:33 +0200	[thread overview]
Message-ID: <20210604151745.310318-2-pbonzini@redhat.com> (raw)
In-Reply-To: <20210604151745.310318-1-pbonzini@redhat.com>

Right now all dependencies for block modules are passed to
module_ss.add(when: ...), so they are mandatory.  In the next patch we
will need to add a libm dependency to a module, but libm does not exist
on all systems.  So, modify the creation of module_ss and modsrc so that
dependencies can also be passed to module_ss.add(if_true: ...).

While touching the array, remove the useless dependency of the curl
module on glib.  glib is always linked in QEMU and in fact all other
block modules also need it, but they don't have to specify it.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 block/meson.build | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/block/meson.build b/block/meson.build
index e687c54dbc..9e3388f633 100644
--- a/block/meson.build
+++ b/block/meson.build
@@ -71,19 +71,19 @@ block_modules = {}
 
 modsrc = []
 foreach m : [
-  [curl, 'curl', [curl, glib], 'curl.c'],
-  [glusterfs, 'gluster', glusterfs, 'gluster.c'],
-  [libiscsi, 'iscsi', libiscsi, 'iscsi.c'],
-  [libnfs, 'nfs', libnfs, 'nfs.c'],
-  [libssh, 'ssh', libssh, 'ssh.c'],
-  [rbd, 'rbd', rbd, 'rbd.c'],
+  [curl, 'curl', files('curl.c')],
+  [glusterfs, 'gluster', files('gluster.c')],
+  [libiscsi, 'iscsi', files('iscsi.c')],
+  [libnfs, 'nfs', files('nfs.c')],
+  [libssh, 'ssh', files('ssh.c')],
+  [rbd, 'rbd', files('rbd.c')],
 ]
   if m[0].found()
+    module_ss = ss.source_set()
+    module_ss.add(when: m[0], if_true: m[2])
     if enable_modules
-      modsrc += files(m[3])
+      modsrc += module_ss.all_sources()
     endif
-    module_ss = ss.source_set()
-    module_ss.add(when: m[2], if_true: files(m[3]))
     block_modules += {m[1] : module_ss}
   endif
 endforeach
-- 
2.31.1




  reply	other threads:[~2021-06-04 15:19 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-04 15:17 [PULL 00/13] Misc bugfix patches for 2021-06-04 Paolo Bonzini
2021-06-04 15:17 ` Paolo Bonzini [this message]
2021-06-04 15:17 ` [PULL 02/13] iscsi: link libm into the module Paolo Bonzini
2021-06-04 15:17 ` [PULL 03/13] oslib-posix: Remove OpenBSD workaround for fcntl("/dev/null", F_SETFL, O_NONBLOCK) failure Paolo Bonzini
2021-06-04 15:17 ` [PULL 04/13] target/i386: tcg: fix segment register offsets for 16-bit TSS Paolo Bonzini
2021-06-04 15:17 ` [PULL 05/13] target/i386: tcg: fix loading of registers from " Paolo Bonzini
2021-06-04 15:17 ` [PULL 06/13] target/i386: tcg: fix switching from 16-bit to 32-bit tasks or vice versa Paolo Bonzini
2021-06-04 15:17 ` [PULL 07/13] target/i386: Fix decode of cr8 Paolo Bonzini
2021-06-04 15:17 ` [PULL 08/13] tests/qtest/virtio-scsi-test: add unmap large LBA with 4k blocks test Paolo Bonzini
2021-06-04 15:17 ` [PULL 09/13] i386: reorder call to cpu_exec_realizefn Paolo Bonzini
2021-06-04 15:17 ` [PULL 10/13] i386: run accel_cpu_instance_init as post_init Paolo Bonzini
2021-06-04 15:17 ` [PULL 11/13] qemu-config: parse configuration files to a QDict Paolo Bonzini
2021-06-04 15:17 ` [PULL 12/13] vl: plumb keyval-based options into -readconfig Paolo Bonzini
2021-06-29 12:52   ` Peter Maydell
2021-06-04 15:17 ` [PULL 13/13] vl: plug -object back " Paolo Bonzini
2021-06-05 10:25 ` [PULL 00/13] Misc bugfix patches for 2021-06-04 Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210604151745.310318-2-pbonzini@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.