How to add options to the javac build in the JDK 8 repo?
Stuart Marks
stuart.marks at oracle.com
Thu Sep 5 19:03:08 UTC 2013
On 9/5/13 10:53 AM, Joe Darcy wrote:
> On 9/5/2013 2:01 AM, Magnus Ihse Bursie wrote:
>> First of all, I think what you're doing is a great job, and I'm all in
>> favor of enabling more warnings!
>
> Thanks; I'm all for more warnings too :-)
I think you meant, you're for *fewer* warnings. :-)
>>> DISABLE_WARNINGS:=-Xlint:all,-deprecation,-unchecked,-rawtypes,-cast,-serial,-dep-ann,-static,-fallthrough,-try,-varargs,-empty,-finally
>>>
>>> +JAVAC_WARNINGS:=-Xlint:-unchecked,-deprecation,-overrides,auxiliaryclass,classfile,dep-ann,divzero,empty,try,varargs
>>> -Werror
Whither DISABLE_WARNINGS? It's used in a couple other build macros in
Setup.gmk. It's also used in a build macro in CompileJavaClasses.gmk.
Should they all be changed to use JAVAC_WARNINGS?
There may be valid reasons to use different warnings flags for different
build rules, but which variables are used where should be made clear
through better naming and comments.
It might be worthwhile to throw in a comment that describes how
JAVAC_WARNINGS can be overridden to enable all warnings. This is useful
for working on warnings cleanup or for generating statistics. Something
like:
# To build with all warnings enabled, do the following:
# make JAVAC_WARNINGS="-Xlint:all -Xmaxwarns 10000"
s'marks
More information about the build-dev
mailing list