RFR: JDK-8188012 Nashorn build targets version 9 source
dalibor topic
dalibor.topic at oracle.com
Wed Sep 27 08:53:27 UTC 2017
On 27.09.2017 10:30, 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)).
>
> 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/" \
Wouldn't using '--release 9' instead of explicit '-source' and '-target'
be a better choice here, per http://openjdk.java.net/jeps/247 ?
cheers,
dalibor topic
> --system none --module-source-path $(call GetModuleSrcPath), \
> SERVER_DIR := $(SJAVAC_SERVER_DIR), \
> SERVER_JVM := $(SJAVAC_SERVER_JAVA)))
>
> /Magnus
--
<http://www.oracle.com> Dalibor Topic | Principal Product Manager
Phone: +494089091214 <tel:+494089091214> | Mobile: +491737185961
<tel:+491737185961>
ORACLE Deutschland B.V. & Co. KG | Kühnehöfe 5 | 22761 Hamburg
ORACLE Deutschland B.V. & Co. KG
Hauptverwaltung: Riesstr. 25, D-80992 München
Registergericht: Amtsgericht München, HRA 95603
Komplementärin: ORACLE Deutschland Verwaltung B.V.
Hertogswetering 163/167, 3543 AS Utrecht, Niederlande
Handelsregister der Handelskammer Midden-Niederlande, Nr. 30143697
Geschäftsführer: Alexander van der Ven, Jan Schultheiss, Val Maher
<http://www.oracle.com/commitment> Oracle is committed to developing
practices and products that help protect the environment
More information about the nashorn-dev
mailing list