Re: [Qemu-devel] [PATCH 4/8] convert libqemuutil to meson

2019-07-29 Thread Paolo Bonzini
On 29/07/19 14:41, Alex Bennée wrote: >> I'd suggest we don't actually /need/ per-file compiler flags in most >> cases. eg when we add $foo.o-libs += $(FOO_LIBS) that's not really >> a per-file setting when it gets expanded onto the final linker line. >> Its just a "-lfoo" that gets used for the l

Re: [Qemu-devel] [PATCH 4/8] convert libqemuutil to meson

2019-07-29 Thread Alex Bennée
Daniel P. Berrangé writes: > On Sat, Jul 27, 2019 at 07:20:15PM +0100, Peter Maydell wrote: >> On Sat, 27 Jul 2019 at 13:24, Paolo Bonzini wrote: >> > >> > On 27/07/19 09:16, Markus Armbruster wrote: >> > > We started with a single trace-events. That wasn't good, so we split it >> > > up into

Re: [Qemu-devel] [PATCH 4/8] convert libqemuutil to meson

2019-07-29 Thread Markus Armbruster
Paolo Bonzini writes: > On 29/07/19 11:32, Peter Maydell wrote: >>> The NetBSD thing could be worked around with a static library but >>> instead those -D options could be added as global C++ flags: >>> >>> __STDC_LIMIT_MACROS and __STDC_CONSTANT_MACROS are a workaround to >>> allow C++ p

Re: [Qemu-devel] [PATCH 4/8] convert libqemuutil to meson

2019-07-29 Thread Paolo Bonzini
On 29/07/19 11:32, Peter Maydell wrote: >> The NetBSD thing could be worked around with a static library but >> instead those -D options could be added as global C++ flags: >> >> __STDC_LIMIT_MACROS and __STDC_CONSTANT_MACROS are a workaround to >> allow C++ programs to use stdint.h macros

Re: [Qemu-devel] [PATCH 4/8] convert libqemuutil to meson

2019-07-29 Thread Peter Maydell
On Mon, 29 Jul 2019 at 10:29, Paolo Bonzini wrote: > > On 29/07/19 11:21, Peter Maydell wrote: > > On Mon, 29 Jul 2019 at 09:51, Paolo Bonzini wrote: > >> There is no case where we're using per-.o file CFLAGS for anything other > >> than dependencies. > > > > disas/libvixl is a counterexample --

Re: [Qemu-devel] [PATCH 4/8] convert libqemuutil to meson

2019-07-29 Thread Paolo Bonzini
On 29/07/19 11:21, Peter Maydell wrote: > On Mon, 29 Jul 2019 at 09:51, Paolo Bonzini wrote: >> There is no case where we're using per-.o file CFLAGS for anything other >> than dependencies. > > disas/libvixl is a counterexample -- we use per-.o-file CFLAGS for: > * suppressing warnings in third

Re: [Qemu-devel] [PATCH 4/8] convert libqemuutil to meson

2019-07-29 Thread Peter Maydell
On Mon, 29 Jul 2019 at 09:51, Paolo Bonzini wrote: > There is no case where we're using per-.o file CFLAGS for anything other > than dependencies. disas/libvixl is a counterexample -- we use per-.o-file CFLAGS for: * suppressing warnings in third-party code we don't want to carry local modifi

Re: [Qemu-devel] [PATCH 4/8] convert libqemuutil to meson

2019-07-29 Thread Peter Maydell
On Mon, 29 Jul 2019 at 09:21, Daniel P. Berrangé wrote: > You can disable warnings selectively per file using a Pragma in the > source. In at least one of these cases (libvixl) the point of using the per-file flags is that the source files are third party upstream ones which we don't want to carr

Re: [Qemu-devel] [PATCH 4/8] convert libqemuutil to meson

2019-07-29 Thread Paolo Bonzini
On 29/07/19 09:09, Markus Armbruster wrote: > Peter Maydell writes: > >> On Sat, 27 Jul 2019 at 13:24, Paolo Bonzini wrote: >>> >>> On 27/07/19 09:16, Markus Armbruster wrote: We started with a single trace-events. That wasn't good, so we split it up into one per directory. That isn'

Re: [Qemu-devel] [PATCH 4/8] convert libqemuutil to meson

2019-07-29 Thread Daniel P . Berrangé
On Sat, Jul 27, 2019 at 07:20:15PM +0100, Peter Maydell wrote: > On Sat, 27 Jul 2019 at 13:24, Paolo Bonzini wrote: > > > > On 27/07/19 09:16, Markus Armbruster wrote: > > > We started with a single trace-events. That wasn't good, so we split it > > > up into one per directory. That isn't good,

Re: [Qemu-devel] [PATCH 4/8] convert libqemuutil to meson

2019-07-29 Thread Markus Armbruster
Peter Maydell writes: > On Sat, 27 Jul 2019 at 13:24, Paolo Bonzini wrote: >> >> On 27/07/19 09:16, Markus Armbruster wrote: >> > We started with a single trace-events. That wasn't good, so we split it >> > up into one per directory. That isn't good, so what about splitting it >> > up into one

Re: [Qemu-devel] [PATCH 4/8] convert libqemuutil to meson

2019-07-27 Thread Peter Maydell
On Sat, 27 Jul 2019 at 13:24, Paolo Bonzini wrote: > > On 27/07/19 09:16, Markus Armbruster wrote: > > We started with a single trace-events. That wasn't good, so we split it > > up into one per directory. That isn't good, so what about splitting it > > up into one per source file? Pass -DTRACE

Re: [Qemu-devel] [PATCH 4/8] convert libqemuutil to meson

2019-07-27 Thread Paolo Bonzini
On 27/07/19 09:16, Markus Armbruster wrote: > We started with a single trace-events. That wasn't good, so we split it > up into one per directory. That isn't good, so what about splitting it > up into one per source file? Pass -DTRACE_HEADER='"trace-DIR-FOO.h" > instead of -DTRACE_HEADER='"trace

Re: [Qemu-devel] [PATCH 4/8] convert libqemuutil to meson

2019-07-27 Thread Markus Armbruster
Paolo Bonzini writes: > On 13/07/19 16:15, Markus Armbruster wrote: >>>In particular the tracing headers are using >>> $(build_root)/$(>> "trace/trace-audio.h" and have sixty one-line forwarding headers in the >>> source tree; for example "audio/trace.h" includes "trace/trace-

Re: [Qemu-devel] [PATCH 4/8] convert libqemuutil to meson

2019-07-13 Thread Paolo Bonzini
On 13/07/19 16:15, Markus Armbruster wrote: >>In particular the tracing headers are using >> $(build_root)/$(> "trace/trace-audio.h" and have sixty one-line forwarding headers in the >> source tree; for example "audio/trace.h" includes "trace/trace-audio.h". >> I'm not sure if i

Re: [Qemu-devel] [PATCH 4/8] convert libqemuutil to meson

2019-07-13 Thread Markus Armbruster
Cc: Stefan for the tracing part. Stefan, there are some observations for you buried inline. Search for "I guess the timestamp thing is for avoiding recompilation", "generate trace.* per directory", and "we run $(TRACETOOL) N times on the same input". Paolo Bonzini writes: > This shows how to d

[Qemu-devel] [PATCH 4/8] convert libqemuutil to meson

2019-07-10 Thread Paolo Bonzini
This shows how to do some "computations" in meson.build using its array and dictionary data structures, and also a basic usage of the sourceset module for conditional compilation. Overall the look of the meson.build code is quite good, however Meson doesn't enjoy the same flexibility we have with