Subject: Re: [PATCH 4/3] Makefile: untangle DEVELOPER and -Werror

From: Ævar Arnfjörð Bjarmason <[email-masked]>
Date: Tue, 03 Apr 2018 11:19:46 +0200

On Sat, Mar 31 2018, Duy Nguyen wrote:

> On Sat, Mar 31, 2018 at 6:40 PM, Ævar Arnfjörð Bjarmason
> <[email-masked]> wrote:
>> 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.

We could do that, but I don't think it's that bad. This patch is one
extra option on top of yours, and it's not going to result in some
combinatorial explosion of options, i.e. if we add DEVELOPER_PEDANTIC
we'll just add one extra flag.

But sure, we could make this some string we'd need to parse out similar
to COMPILER_FEATURES, it just seems more complex to me for this task.