Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 1.8.5, 2.0-beta-2
-
Component/s: Compiler
-
Labels:None
-
Number of attachments :
Description
When trying to configure the joint compiler to treat java compile warnings as errors I tried to set the following javac args:
- -Xlint:all
- -Werror
I found that -Xlint:all worked, but -Werror gave me an error saying that it was an unrecognised option. After some digging it seems that the joint compiler prefixes all options bound for javac with -F, which means the lint option was transformed to "-FXlint:all" but the -Werror option didn't get this same transformation. If I manually added the "-F" making it "-FWerror" everything worked as it should.
I went looking for whereabouts this prefixing gets applied to try and determine why it wasn't happening to "-Werror" but couldn't find it.
-X options become -FX in joint compilation here: https://github.com/groovy/groovy-core/blob/GROOVY_1_9_BETA_3/src/main/org/codehaus/groovy/ant/Groovyc.java#L751