RFR: JDK-8188012 Nashorn build targets version 9 source

David Holmes david.holmes at oracle.com
Wed Sep 27 08:55:41 UTC 2017


On 27/09/2017 6:30 PM, Magnus Ihse Bursie wrote:
> 
> The nashorn java code requires a somewhat convoluted compilation. As a 
> result, we use a special java compiler setup, 
> GENERATE_NEWBYTECODE_DEBUG. This explicitly lists -source 9 -target 9, 
> which generates this warning:
> 
> warning: [options] bootstrap class path not set in conjunction with 
> -source 1.9
> 
> when building in jdk10. I assume this is just a mistake, and that it 
> should really target 10. (Or, to always be in sync, perhaps even 
> $(VERSION_MAJOR)).

Seems like a reasonable assumption. Though one has to wonder why we even 
set the source/target? That would only be necessary if we needed to 
force building to an older level. I think these could just be removed.

Cheers,
David


> Bug: https://bugs.openjdk.java.net/browse/JDK-8188012
> Patch inline:
> diff --git a/make/BuildNashorn.gmk b/make/BuildNashorn.gmk
> --- a/make/BuildNashorn.gmk
> +++ b/make/BuildNashorn.gmk
> @@ -41,7 +41,7 @@
>   $(eval $(call SetupJavaCompiler, GENERATE_NEWBYTECODE_DEBUG, \
>       JVM := $(JAVA_JAVAC), \
>       JAVAC := $(NEW_JAVAC), \
> -    FLAGS := -g -source 9 -target 9 --upgrade-module-path 
> "$(JDK_OUTPUTDIR)/modules/" \
> +    FLAGS := -g -source 10 -target 10 --upgrade-module-path 
> "$(JDK_OUTPUTDIR)/modules/" \
>            --system none --module-source-path $(call GetModuleSrcPath), \
>       SERVER_DIR := $(SJAVAC_SERVER_DIR), \
>       SERVER_JVM := $(SJAVAC_SERVER_JAVA)))
> 
> /Magnus


More information about the nashorn-dev mailing list