Re: [PATCH v2 2/2] ci: compile "linux-gcc-default" job with -Og
- From
Jeff King <peff@peff.net>
- Date
- Jun 8, 2024, 08:49 UTC
- Message-ID
- <20240608084910.GC2390433@coredump.intra.peff.net>
- In-Reply-To
- <xmqqikykd22p.fsf@gitster.g>
On Fri, Jun 07, 2024 at 11:45:18AM -0700, Junio C Hamano wrote:
Show 6 quoted lines
> Patrick Steinhardt <ps@pks.im> writes: > > > We're unlikely to break existing workflows though if we name this > > variable something like `OPTIMIZATION_LEVEL`. > > Yeah, being more explicit is always good.
One of the reasons I used the very short "O" for mine is that I often specify it by hand. I actually leave it as O=0 by default, since the majority of my builds are about developing and debugging (so speed of compilation is much more important than speed of the resulting executable). And then when I am interested in performance, I run "make O=2".
So OPTIMIZATION_LEVEL defeats the purpose. ;)
Show 9 quoted lines
> > We could also generalize this a bit and introduce `CFLAGS_APPEND` > > instead. Optimization levels are last-one-wins anyway, so people can use > > that to append their own flags without overriding existing values. It > > would also mean that we can avoid repeating the CFLAGS that we already > > have in our Makefile in our CI scripts. > > Yup, Peff's $(O) cannot serve as such, but my $(O) is already being > used as such. Naming the variable that gives additional CFLAGS as > such is probably a good way to go.
I have something like this in my config.mak, too. ;) But I call it EXTRA_CFLAGS. That seems less grammatically awkward to me than CFLAGS_APPEND, but that may be entering bikeshed territory.
And you can tell from the length name that I do not use it all that often.
-Peff