Re: [PATCH v2] travis-ci: enable more warnings on travis linux-gcc job
- From
Lars Schneider <larsxschneider@gmail.com>
- Date
- Mar 17, 2018, 14:29 UTC
- Message-ID
- <D8137CD9-9E11-4FBC-B89B-907C007FC6E9@gmail.com>
- In-Reply-To
- <CACsJy8A3_itjs0MRar+Aog=0yZDuAK2-x4MU=Rvqh2C6Le-7Aw@mail.gmail.com>
Show 32 quoted lines
> On 17 Mar 2018, at 09:01, Duy Nguyen <pclouds@gmail.com> wrote: > > On Fri, Mar 16, 2018 at 10:22 PM, Jeff King <peff@peff.net> wrote: >>> diff --git a/ci/run-build-and-tests.sh b/ci/run-build-and-tests.sh >>> index 3735ce413f..f6f346c468 100755 >>> --- a/ci/run-build-and-tests.sh >>> +++ b/ci/run-build-and-tests.sh >>> @@ -7,6 +7,22 @@ >>> >>> ln -s "$cache_dir/.prove" t/.prove >>> >>> +if [ "$jobname" = linux-gcc ]; then >>> + gcc-6 --version >>> + cat >config.mak <<-EOF >>> + CC=gcc-6 >>> + CFLAGS = -g -O2 -Wall >>> + CFLAGS += -Wextra >>> + CFLAGS += -Wmissing-prototypes >>> + CFLAGS += -Wno-empty-body >>> + CFLAGS += -Wno-maybe-uninitialized >>> + CFLAGS += -Wno-missing-field-initializers >>> + CFLAGS += -Wno-sign-compare >>> + CFLAGS += -Wno-unused-function >>> + CFLAGS += -Wno-unused-parameter >>> + EOF >>> +fi >> >> Why isn't this just turning on DEVELOPER=1 if we know we have a capable >> compiler? > > DEVELOPER=1 is always set even before this patch. It's set and > exported in lib-travisci.sh.
I interpreted Peff's comment like this:
If DEVELOPER=1 is set and we detect a gcc-6 in the makefile, then we could set your additional flags in the makefile.
This way every developer with a new compiler would run these flags locally (if DEVELOPER=1 is set).
- Lars