[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 108/143] meson: convert hw/intc
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [PATCH 108/143] meson: convert hw/intc |
Date: |
Thu, 6 Aug 2020 23:42:13 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 |
On 8/6/20 11:20 PM, Paolo Bonzini wrote:
>
>
> Il gio 6 ago 2020, 23:02 Peter Maydell <peter.maydell@linaro.org
> <mailto:peter.maydell@linaro.org>> ha scritto:
>
> On Thu, 6 Aug 2020 at 21:10, Paolo Bonzini <pbonzini@redhat.com
> <mailto:pbonzini@redhat.com>> wrote:
> >
> > From: Marc-André Lureau <marcandre.lureau@redhat.com
> <mailto:marcandre.lureau@redhat.com>>
> >
> > Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com
> <mailto:marcandre.lureau@redhat.com>>
> > Signed-off-by: Paolo Bonzini <pbonzini@redhat.com
> <mailto:pbonzini@redhat.com>>
>
> Compared to:
>
> > -common-obj-$(CONFIG_HEATHROW_PIC) += heathrow_pic.o
>
> > +softmmu_ss.add(when: 'CONFIG_HEATHROW_PIC', if_true:
> files('heathrow_pic.c'))
>
> this feels pretty clunky. Doesn't Meson have a nicer
> way of expressing this kind of thing?
Don't forget we also use:
HELPERS-$(call land,$(CONFIG_SOFTMMU),$(CONFIG_LINUX)) +=
qemu-bridge-helper$(EXESUF)
ifeq ($(CONFIG_LINUX)$(CONFIG_VIRGL)$(CONFIG_GBM)$(CONFIG_TOOLS),yyyy)
HELPERS-y += vhost-user-gpu$(EXESUF)
vhost-user-json-y += contrib/vhost-user-gpu/50-qemu-gpu.json
endif
>
>
> Nope, in fact it turns out we had to implement it ourselves because
> there was no way to express it at all in the way that QEMU build
> multiple binaries. My initial version didn't have the when/if_true part
> but the maintainer was quite adamant on requiring them instead of just
> relying on positional arguments.
>
> Unfortunately, while common in QEMU, and in Linux too, it doesn't seem
> to be a very common idiom in general; Makefiles do express it in a very
> readable and concise way.
>
> I cannot deny it looks clunky. While Meson does have a huge advantage in
> terms of predictability and lack of surprises when doing harder things,
> the imperative syntax is heavier when dealing with the simplest. They do
> remain simple (it's still one line of coffee), but the quotes and commas
> seem to be enough to "switch" our brain to a different mode.
>
> My opinion is that you don't really look at these things very much, so
> it doesn't really matter, but I can see people disagreeing.
>
> (You had already pointed this out during the very first discussions, if
> I remember correctly. I can't add much except that with extra experience
> the balance does tilt in favor of Meson despite the heavier syntax for
> simple cases).
>
> Paolo
>
> It's really
> common and I'd hope that a build system language
> would provide less long-winded ways to write common
> operations...
>
> thanks
> -- PMM
>
- [PATCH 102/143] meson: convert hw/rdma, (continued)
- [PATCH 102/143] meson: convert hw/rdma, Paolo Bonzini, 2020/08/06
- [PATCH 103/143] meson: convert hw/net, Paolo Bonzini, 2020/08/06
- [PATCH 104/143] meson: convert hw/misc, Paolo Bonzini, 2020/08/06
- [PATCH 106/143] meson: convert hw/ipmi, Paolo Bonzini, 2020/08/06
- [PATCH 105/143] meson: convert hw/isa, Paolo Bonzini, 2020/08/06
- [PATCH 107/143] meson: convert hw/ipack, Paolo Bonzini, 2020/08/06
- [PATCH 108/143] meson: convert hw/intc, Paolo Bonzini, 2020/08/06
- [PATCH 109/143] meson: convert hw/input, Paolo Bonzini, 2020/08/06
- [PATCH 110/143] meson: convert hw/ide, Paolo Bonzini, 2020/08/06
- [PATCH 111/143] meson: convert hw/i2c, Paolo Bonzini, 2020/08/06
- [PATCH 112/143] meson: convert hw/hyperv, Paolo Bonzini, 2020/08/06
- [PATCH 113/143] meson: convert hw/gpio, Paolo Bonzini, 2020/08/06
- [PATCH 114/143] meson: convert hw/dma, Paolo Bonzini, 2020/08/06
- [PATCH 116/143] meson: convert hw/cpu, Paolo Bonzini, 2020/08/06
- [PATCH 115/143] meson: convert hw/display, Paolo Bonzini, 2020/08/06