Re: [PATCH 4/3] Makefile: untangle DEVELOPER and -Werror
- From
Duy Nguyen <pclouds@gmail.com>
- Date
- Mar 31, 2018, 18:36 UTC
- Message-ID
- <CACsJy8CyB0igY365NMkswSgAi9_rf+XBOMQyJ7XW6iQxQiCEyQ@mail.gmail.com>
- In-Reply-To
- <20180331164009.2264-1-avarab@gmail.com>
On Sat, Mar 31, 2018 at 6:40 PM, Ævar Arnfjörð Bjarmason <avarab@gmail.com> wrote:
Show 18 quoted lines
> Change the DEVELOPER flag, and the newly added EAGER_DEVELOPER flag > which (approximately) enables -Wextra so that any combination of them > and -Werror can be set. > > I've long wanted to use DEVELOPER=1 in my production builds, but on > some old systems I still get warnings, and thus the build would > fail. However if the build/tests fail for some other reason, it would > still be useful to scroll up and see what the relevant code is warning > about. > > This change allows for that. Now setting DEVELOPER will set -Werror as > before, but if DEVELOPER_NONFATAL is set you'll get the same warnings, > but without -Werror. > > I've renamed the newly added EAGER_DEVELOPER flag to > DEVELOPER_EXTRA. The reason is that it approximately turns on -Wextra, > and it'll be more consistent to add e.g. DEVELOPER_PEDANTIC later than > inventing some new name of our own (VERY_EAGER_DEVELOPER?).
Before we go with zillions of *DEVELOPER* maybe we can have something like DEVOPTS where you can give multiple keywords to a single variable to influence config.mak.dev. This is similar to COMPILER_FEATURES we already have in there, but now it's driven by the dev instead of the compiler. So you can have keywords like "gentle" (no -Werror) "extra" (-Wextra with no suppression) and something else.
-- Duy