mbox series

[v2,0/2] build spice chardevs as module

Message ID 20200916083913.11902-1-kraxel@redhat.com
Headers show
Series build spice chardevs as module | expand

Message

Gerd Hoffmann Sept. 16, 2020, 8:39 a.m. UTC
Gerd Hoffmann (2):
  spice: simplify chardev setup
  chardev: build spice chardevs as module

 include/chardev/spice.h |  1 -
 include/ui/qemu-spice.h |  1 -
 chardev/spice.c         | 29 ++++++-----------------------
 softmmu/vl.c            |  9 +++++----
 ui/spice-app.c          | 17 +++++++++--------
 ui/spice-core.c         |  2 --
 util/module.c           |  2 ++
 chardev/meson.build     |  7 ++++++-
 8 files changed, 28 insertions(+), 40 deletions(-)

-- 
2.27.0

Comments

Paolo Bonzini Sept. 16, 2020, 9:22 a.m. UTC | #1
On 16/09/20 10:39, Gerd Hoffmann wrote:
> +if config_host.has_key('CONFIG_SPICE')
> +  module_ss = ss.source_set()
> +  module_ss.add(when: [spice], if_true: [files('spice.c'), spice])

You don't need to have "spice" listed in both sides.  It is not needed
in "when" because you are effectively inside an "if spice.found()" that
is written in a weird way; and it is not needed in "if_true" if it is
listed in "when".

So it can be either

  module_ss.add(files('spice.c'), spice)

or

  module_ss.add(when: spice, if_true: files('spice.c'))

Thanks,

Paolo


> +  chardev_modules += { 'spice': module_ss }
> +endif
> +