Request for guidance on using possible future sets of javac options
Magnus Ihse Bursie
magnus.ihse.bursie at oracle.com
Fri Feb 6 23:45:34 UTC 2015
On 2015-02-06 23:43, joe darcy wrote:
> Hi Erik,
>
> On 2/6/2015 12:03 AM, Erik Joelsson wrote:
>> Hello Joe,
>>
>> The simplest way of accomplishing this currently would be to add
>> lines like this to make/CompileJavaModules.gmk:
>>
>> java.base_ADD_JAVAC_FLAGS := -Xdoclint:all/protected
>> "-XdoclintPackage:java.*;javax.*"
>> java.desktop_ADD_JAVAC_FLAGS := -Xdoclint:all,-missing/protected
>> "-XdoclintPackage:java.*;javax.*"
>>
>> This assuming those modules are already setup to using -Xlint:all
>> -Werror in make/common/SetupJavacompilers.gmk, which should be true
>> for at least those two.
>>
>> Is the separator ';' actually a path separator or always semi colon?
>> If so, please use $(PATH_SEP). Also, a line containing a potential
>> semi colon must always be quoted before given to the shell.
>
> That particular idiom didn't seem to work. I also tried
It seems the value was not propagated correctly. Try adding this patch:
diff --git a/make/CompileJavaModules.gmk b/make/CompileJavaModules.gmk
--- a/make/CompileJavaModules.gmk
+++ b/make/CompileJavaModules.gmk
@@ -481,7 +481,7 @@
$1_CLASSPATH := $$($1_CLASSPATH) $$(addprefix
$(JDK_OUTPUTDIR)/modules/,jdk.hotspot.agent)
endif
$1_CLASSPATH := $$(subst $$(SPACE),$$(PATH_SEP),$$($1_CLASSPATH))
- $1_JAVAC_FLAGS := -bootclasspath "$$($1_CLASSPATH)"
+ $1_JAVAC_FLAGS := -bootclasspath "$$($1_CLASSPATH)"
$$($1_ADD_JAVAC_FLAGS)
$$(eval $$(call SetupJavaCompilation,$1, \
SETUP := $$(if $$($1_SETUP), $$($1_SETUP), GENERATE_JDKBYTECODE), \
Now Erik's suggestion should work.
Also, if the syntax is still in flux, I'd like to recommend a solution
without semicolon, since that is interpreted as a command line separator
in the unix shell world, and it's always a lot of hassle if you need to
propagate those. Commas are much simpler. :)
/Magnus
More information about the build-dev
mailing list