Hi David,
-Xmaxwarns controls how many warnings can be emitted - the default is
100, which means after 100 warnings the warning output will be omitted.
There are similar options to limit errors and notes.
That said, changing these limits does not affect the 'treat the warning
as errors' policy - which is controlled by a separate flag, namely -Werror.
In 'make/common/SetupJavaCmpilers.gmk' there are these lines:
# If warnings needs to be non-fatal for testing purposes use a command like:
# make JAVAC_WARNINGS="-Xlint:all -Xmaxwarns 10000"
JAVAC_WARNINGS := -Xlint:all -Werror
So, the Werror flag doesn't seem controlled by the configuration-wide
'disable-warnings-as-errors' - which means you probably have to edit
that makefile and remove the Werror flag.
Cheers
Maurizio
On 13/09/17 11:30, David Holmes wrote:
On 13/09/2017 7:33 PM, David Holmes wrote:
I'm building with --disable-warnings-as-errors but the build still
fails:
1 error
100 warnings
CompileJavaModules.gmk:623: recipe for target
'/export/users/dh198349/valhalla/valhalla-nestmates/build/linux-x64-open-debug/jdk/modules/java.datatransfer/_the.java.datatransfer_batch'
failed
make[3]: ***
[/export/users/dh198349/valhalla/valhalla-nestmates/build/linux-x64-open-debug/jdk/modules/java.datatransfer/_the.java.datatransfer_batch]
Error 1
make/Main.gmk:198: recipe for target 'java.datatransfer-java' failed
make[2]: *** [java.datatransfer-java] Error 1
Is there a maximum number of warnings allowed before it's considered
an error? Could this be coming from (s)javac? (The warnings are Java
related).
I was told about -Xmaxwarns for javac and I bumped it to 1000 but it
didn't help much:
1 error
138 warnings
...
I finally spotted this in the log:
error: warnings found and -Werror specified
From the make-support/failure-log I see -Werror in the javac command
line. Obviously it isn't adhering to --disable-warnings-as-errors! :(
David
Thanks,
David