8155944: ant build/test of nashorn is broken with the latest jdk9-dev build
authorsundar
Tue, 03 May 2016 21:27:00 +0530
changeset 37829 cd05ec7e2b76
parent 37828 3a06bcd89461
child 37830 a2a8111e9eb7
8155944: ant build/test of nashorn is broken with the latest jdk9-dev build Reviewed-by: jlaskey
nashorn/buildtools/nasgen/build.xml
nashorn/buildtools/nasgen/project.properties
nashorn/make/build-nasgen.xml
nashorn/make/build.xml
nashorn/make/project.properties
--- a/nashorn/buildtools/nasgen/build.xml	Tue May 03 10:39:00 2016 +0100
+++ b/nashorn/buildtools/nasgen/build.xml	Tue May 03 21:27:00 2016 +0530
@@ -42,7 +42,7 @@
            destdir="${build.classes.dir}"
            debug="${javac.debug}"
            includeantruntime="false" fork="true">
-      <compilerarg value="-XaddExports:${nasgen.module.imports}"/>
+      <compilerarg line="${nasgen.module.imports}"/>
       <compilerarg value="-Xlint:unchecked"/>
       <compilerarg value="-Xlint:deprecation"/>
       <compilerarg value="-XDignore.symbol.file"/>
--- a/nashorn/buildtools/nasgen/project.properties	Tue May 03 10:39:00 2016 +0100
+++ b/nashorn/buildtools/nasgen/project.properties	Tue May 03 21:27:00 2016 +0530
@@ -40,8 +40,8 @@
 javac.debug=true
 
 nasgen.module.imports=\
-    java.base/jdk.internal.org.objectweb.asm=ALL-UNNAMED,\
-    java.base/jdk.internal.org.objectweb.asm.util=ALL-UNNAMED
+    -XaddExports:java.base/jdk.internal.org.objectweb.asm=ALL-UNNAMED \
+    -XaddExports:java.base/jdk.internal.org.objectweb.asm.util=ALL-UNNAMED
 
 meta.inf.dir=${src.dir}/META-INF
 run.classpath=\
--- a/nashorn/make/build-nasgen.xml	Tue May 03 10:39:00 2016 +0100
+++ b/nashorn/make/build-nasgen.xml	Tue May 03 21:27:00 2016 +0530
@@ -36,7 +36,7 @@
                 <pathelement location="${basedir}/jcov2/lib/jcov_j2se_rt.jar"/>
                 <pathelement location="${basedir}/buildtools/nasgen/dist/nasgen.jar"/>
             </classpath>
-            <jvmarg value="-XaddExports:${nasgen.module.imports}"/>
+            <jvmarg line="${nasgen.module.imports}"/>
             <arg value="${nashorn.module.classes.dir}"/>
             <arg value="jdk.nashorn.internal.objects"/>
             <arg value="${nashorn.module.classes.dir}"/>
--- a/nashorn/make/build.xml	Tue May 03 10:39:00 2016 +0100
+++ b/nashorn/make/build.xml	Tue May 03 21:27:00 2016 +0530
@@ -35,7 +35,6 @@
     <path id="nashorn.jar.path">
          <pathelement location="${nashorn.jar}"/>
     </path>
-    <property name="nashorn.override.option" value="-Xpatch:${build.classes.dir}"/>
     <condition property="svn.executable" value="/usr/local/bin/svn" else="svn">
       <available file="/usr/local/bin/svn"/>
     </condition>
@@ -176,6 +175,10 @@
       <compilerarg value="-Xdiags:verbose"/>
       <compilerarg value="-parameters"/>
     </javac>
+    <!-- -Xpatch does not like module-info.class files! -->
+    <delete>
+      <fileset dir="${build.classes.dir}" includes="**/module-info.class"/>
+    </delete>
     <javac srcdir="${nashorn.module.src.dir}"
            destdir="${nashorn.module.classes.dir}"
            source="${javac.source}"
@@ -187,8 +190,12 @@
       <compilerarg value="-XDignore.symbol.file"/>
       <compilerarg value="-Xdiags:verbose"/>
       <compilerarg value="-parameters"/>
-      <compilerarg value="${nashorn.override.option}"/>
+      <compilerarg line="${nashorn.override.option}"/>
     </javac>
+    <!-- -Xpatch does not like module-info.class files! -->
+    <delete>
+      <fileset dir="${build.classes.dir}" includes="**/module-info.class"/>
+    </delete>
     <javac srcdir="${nashorn.shell.module.src.dir}"
            destdir="${nashorn.shell.module.classes.dir}"
            source="${javac.source}"
@@ -200,7 +207,7 @@
       <compilerarg value="-XDignore.symbol.file"/>
       <compilerarg value="-Xdiags:verbose"/>
       <compilerarg value="-parameters"/>
-      <compilerarg value="${nashorn.override.option}"/>
+      <compilerarg line="${nashorn.override.option}"/>
     </javac>
     <!-- -Xpatch does not like module-info.class files! -->
     <delete>
@@ -348,11 +355,11 @@
            debug="${javac.debug}"
            encoding="${javac.encoding}"
            includeantruntime="false" fork="true">
-        <compilerarg value="${nashorn.override.option}"/>
+        <compilerarg line="${nashorn.override.option}"/>
         <compilerarg value="-Xlint:unchecked"/>
         <compilerarg value="-Xlint:deprecation"/>
         <compilerarg value="-Xdiags:verbose"/>
-        <compilerarg value="-XaddExports:${test.module.imports}"/>
+        <compilerarg line="${test.module.imports}"/>
     </javac>
 
     <copy todir="${build.test.classes.dir}/META-INF/services">
--- a/nashorn/make/project.properties	Tue May 03 10:39:00 2016 +0100
+++ b/nashorn/make/project.properties	Tue May 03 21:27:00 2016 +0530
@@ -47,6 +47,11 @@
 build.zip=${build.dir}/nashorn.zip
 build.gzip=${build.dir}/nashorn.tar.gz
 
+nashorn.override.option=\
+ -Xpatch:jdk.scripting.nashorn=${build.classes.dir}/jdk.scripting.nashorn \
+ -Xpatch:jdk.scripting.nashorn.shell=${build.classes.dir}/jdk.scripting.nashorn.shell \
+ -Xpatch:jdk.dynalink=${build.classes.dir}/jdk.dynalink
+
 # project directory of <nashorn> ant task
 nashorntask.dir=buildtools/nashorntask
 
@@ -57,8 +62,8 @@
 nasgen.tool=jdk.nashorn.internal.tools.nasgen.Main
 
 nasgen.module.imports=\
-    java.base/jdk.internal.org.objectweb.asm=ALL-UNNAMED,\
-    java.base/jdk.internal.org.objectweb.asm.util=ALL-UNNAMED
+    -XaddExports:java.base/jdk.internal.org.objectweb.asm=ALL-UNNAMED \
+    -XaddExports:java.base/jdk.internal.org.objectweb.asm.util=ALL-UNNAMED
 
 # parallel test runner tool
 parallel.test.runner=jdk.nashorn.internal.test.framework.ParallelTestRunner
@@ -132,19 +137,19 @@
     ${file.reference.snakeyaml.jar}
 
 test.module.imports=\
-    jdk.scripting.nashorn/jdk.nashorn.internal.ir=ALL-UNNAMED,\
-    jdk.scripting.nashorn/jdk.nashorn.internal.codegen=ALL-UNNAMED,\
-    jdk.scripting.nashorn/jdk.nashorn.internal.parser=ALL-UNNAMED,\
-    jdk.scripting.nashorn/jdk.nashorn.internal.objects=ALL-UNNAMED,\
-    jdk.scripting.nashorn/jdk.nashorn.internal.runtime=ALL-UNNAMED,\
-    jdk.scripting.nashorn/jdk.nashorn.internal.runtime.doubleconv=ALL-UNNAMED,\
-    jdk.scripting.nashorn/jdk.nashorn.internal.runtime.linker=ALL-UNNAMED,\
-    jdk.scripting.nashorn/jdk.nashorn.internal.runtime.events=ALL-UNNAMED,\
-    jdk.scripting.nashorn/jdk.nashorn.internal.runtime.options=ALL-UNNAMED,\
-    jdk.scripting.nashorn/jdk.nashorn.internal.runtime.regexp=ALL-UNNAMED,\
-    jdk.scripting.nashorn/jdk.nashorn.internal.runtime.regexp.joni=ALL-UNNAMED,\
-    jdk.scripting.nashorn/jdk.nashorn.tools=ALL-UNNAMED,\
-    java.base/jdk.internal.org.objectweb.asm=ALL-UNNAMED
+    -XaddExports:jdk.scripting.nashorn/jdk.nashorn.internal.ir=ALL-UNNAMED \
+    -XaddExports:jdk.scripting.nashorn/jdk.nashorn.internal.codegen=ALL-UNNAMED \
+    -XaddExports:jdk.scripting.nashorn/jdk.nashorn.internal.parser=ALL-UNNAMED \
+    -XaddExports:jdk.scripting.nashorn/jdk.nashorn.internal.objects=ALL-UNNAMED \
+    -XaddExports:jdk.scripting.nashorn/jdk.nashorn.internal.runtime=ALL-UNNAMED \
+    -XaddExports:jdk.scripting.nashorn/jdk.nashorn.internal.runtime.doubleconv=ALL-UNNAMED \
+    -XaddExports:jdk.scripting.nashorn/jdk.nashorn.internal.runtime.linker=ALL-UNNAMED \
+    -XaddExports:jdk.scripting.nashorn/jdk.nashorn.internal.runtime.events=ALL-UNNAMED \
+    -XaddExports:jdk.scripting.nashorn/jdk.nashorn.internal.runtime.options=ALL-UNNAMED \
+    -XaddExports:jdk.scripting.nashorn/jdk.nashorn.internal.runtime.regexp=ALL-UNNAMED \
+    -XaddExports:jdk.scripting.nashorn/jdk.nashorn.internal.runtime.regexp.joni=ALL-UNNAMED \
+    -XaddExports:jdk.scripting.nashorn/jdk.nashorn.tools=ALL-UNNAMED \
+    -XaddExports:java.base/jdk.internal.org.objectweb.asm=ALL-UNNAMED
 
 meta.inf.dir=${nashorn.module.src.dir}/META-INF
 
@@ -342,8 +347,8 @@
 
 run.test.jvmargs.common=\
   -server \
-  -XaddExports:${test.module.imports} \
-  -Xpatch:${build.classes.dir} \
+  ${test.module.imports} \
+  ${nashorn.override.option} \
   -Dfile.encoding=UTF-8 \
   -Duser.language=${run.test.user.language} \
   -Duser.country=${run.test.user.country} \