RFR: JDK-8141543 Propagate --disable-warnings-as-errors to hotspot

Volker Simonis volker.simonis at gmail.com
Fri Nov 6 10:44:04 UTC 2015


On Fri, Nov 6, 2015 at 11:06 AM, David Holmes <david.holmes at oracle.com> wrote:
> On 6/11/2015 6:08 PM, Volker Simonis wrote:
>>
>> On Fri, Nov 6, 2015 at 8:35 AM, David Holmes <david.holmes at oracle.com>
>> wrote:
>>>
>>> Hi Magnus,
>>>
>>> On 6/11/2015 1:43 AM, Magnus Ihse Bursie wrote:
>>>>
>>>>
>>>> Unfortunately, the --disable-warnings-as-errors flag only operates on
>>>> the build-infra code, and does not propagate to the Hotspot build
>>>> system.
>>>>
>>>> This is unfortunate, and also very confusing for users who think they
>>>> have disabled warnings as errors, only to get an error in the hotspot
>>>> build instead.
>>>>
>>>> We should set the correct value for hotspot makefiles from configure as
>>>> well.
>>>>
>>>> Bug: https://bugs.openjdk.java.net/browse/JDK-8141543
>>>> WebRev:
>>>>
>>>>
>>>> http://cr.openjdk.java.net/~ihse/JDK-8141543-propagate-disable-warnings-as-errors-to-hotspot/webrev.01
>>>
>>>
>>>
>>> You are setting WARNINGS_AS_ERRORS but hotspot uses WARNINGS_ARE_ERRORS.
>>>
>>
>> David,
>>
>> WARNINGS_AS_ERRORS is only the name of the top-level configure
>> variable. But the actual export to the hotspot build is
>> WARNINGS_ARE_ERRORS:
>>
>> HOTSPOT_SET_WARNINGS_AS_ERRORS=WARNINGS_ARE_ERRORS=
>
>
> I looked at that many times and still did not see it :(
>

It's actually not that hard to understand :)

The configure based make uses the variable WARNINGS_AS_ERRORS which is
controlled by the configure option --enable-warnings-as-errors
Just grep for WARNINGS_AS_ERRORS in jdk9-dev/common, jdk9-dev/make and
jdk9-dev/jdk/make

The hotspot make which is not configure based already uses the
variable WARNINGS_ARE_ERRORS to control the behavior of warnings (just
grep for WARNINGS_ARE_ERRORS in jdk9-dev/hotspot/make).

These two mechanisms are working independently until now the configure
option --enable-warnings-as-errors was not propagated to the hotspot
make. This change simply translates the "warning_should_be_an_error"
variable from the top-level configure and make to the hotspot make
which is good in my opinion.

If the hotspot make will be rewritten to be configure based as well
(which is currently underway in the build-infra repo) it can use the
same variable like the top-level or jdk make, but until then, this is
the best and least intrusive change.

Regards,
Volker


> Really doesn't make sense to have two different words being used.
>
> Thanks,
> David
>
>
>> Regards,
>> Volker
>>
>>> David
>>>
>>>>
>>>> /Magnus



More information about the build-dev mailing list