How to add options to the javac build in the JDK 8 repo?

Joe Darcy joe.darcy at oracle.com
Wed Sep 11 16:51:30 UTC 2013


On 9/11/2013 1:12 AM, David Holmes wrote:
> On 11/09/2013 3:19 PM, Joe Darcy wrote:
>> Hi David,
>>
>> On 9/10/2013 8:31 PM, David Holmes wrote:
>>> Hi Joe,
>>>
>>> I assume these lint settings will cause the build to fail if someone
>>> introduces a new warning.
>>
>> That is the point actually :-)
>>
>>> I'm concerned that build breakage could easily be introduced. If that
>>> happens is there a simple command-line make flag we can specify to
>>> turn this off?
>>
>> New code should be warning free for the lint categories which have been
>> cleared, either naturally or through judicious application of
>> @SuppressWarnings as needed. (For some other categories of warnings,
>> like deprecation, javac fixes are in-progress to improve the handling of
>> @SuppressWarnings.)
>>
>> If you mean for experimentation, how can the settings be overridden,
>> then something like
>>
>>      make JAVAC_WARNINGS="-Xlint:-all"
>>
>> should work.
>
> I was concerned about "accidentally" pushing something that didn't go 
> through a proper build cycle. But that should be a rarity and of 
> course if the Java code compiles cleanly once then it will compile 
> cleanly always (unlike some other code :)).
>

As long as someone does a build using the makefiles in the repo, the 
lint flags will get applied. If someone pushes without doing that much, 
they need to be willing to accept the consequences of their actions ;-)

There is a bit of a hazard if the calculations of javac's warnings 
change and a full build is not done beforehand; unexpected breakage 
could result. However, the javac team is pretty good about doing extra 
building when such a change is underway.

Thanks,

-Joe



More information about the build-dev mailing list