RFR: JDK-8188012 Nashorn build targets version 9 source

Magnus Ihse Bursie magnus.ihse.bursie at oracle.com
Wed Sep 27 08:30:57 UTC 2017


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/" \
           --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