[libvirt PATCH 3/6] meson: merge all cc_flags arrays into one

Pavel Hrdina phrdina at redhat.com
Thu Apr 8 12:16:05 UTC 2021


On Thu, Apr 08, 2021 at 12:54:13PM +0100, Daniel P. Berrangé wrote:
> On Thu, Apr 08, 2021 at 01:30:18PM +0200, Pavel Hrdina wrote:
> > On Thu, Apr 08, 2021 at 11:58:20AM +0100, Daniel P. Berrangé wrote:
> > > The split of arrays is fairly arbitrary and a hang over from the way we
> > > had to structure lists of flags when we used GNULIB's compiler flag
> > > checking m4 logic.
> > > 
> > > The separate lists leads to cases where we enable a flag in one list and
> > > have contradictory setting in another list, which leads to confusion.
> > > 
> > > Signed-off-by: Daniel P. Berrangé <berrange at redhat.com>
> > > ---
> > >  meson.build | 116 +++++++++++++++++++---------------------------------
> > >  1 file changed, 43 insertions(+), 73 deletions(-)
> > > 
> > > diff --git a/meson.build b/meson.build
> > > index 97d9c52165..55dde6d963 100644
> > > --- a/meson.build
> > > +++ b/meson.build
> > > @@ -211,7 +211,23 @@ if git_werror.enabled() or git_werror.auto() and git
> > >    cc_flags += [ '-Werror' ]
> > >  endif
> 
> > I would keep the comment here as well.
> > 
> >   # This should be < 256 really. Currently we're down to 4096,
> >   # but using 1024 bytes sized buffers (mostly for virStrerror)
> >   # stops us from going down further
> 
> It is outdated because virStrerror doesnt exist, and also at this
> point I don't think we need to really care about optimizing further
> than 4k - my original 256 byte statement is overkill.
> 
> With 8 MB stacks, a 4k limit lets us recurse 2048 times in the
> worst case, and much much much in the common case.

Makes sense, would be probably nice to mention it in the commit message
or have it as separate commit because this one only moves the flags
around.

Pavel

> > 
> > > +  '-Wframe-larger-than=4096',
> > >    '-Wfree-nonheap-object',
> > >    '-Whsa',
> > >    '-Wif-not-aligned',
> > >    '-Wignored-attributes',
> 
> Regards,
> Daniel
> -- 
> |: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
> |: https://libvirt.org         -o-            https://fstop138.berrange.com :|
> |: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20210408/5f1eb5a3/attachment-0001.sig>


More information about the libvir-list mailing list