8177845: Need a mechanism to load Graal
authordnsimon
Thu, 27 Apr 2017 23:06:33 -0700
changeset 44830 65c7a535e272
parent 44829 d9f6608f924e
child 44831 4577394d5b98
8177845: Need a mechanism to load Graal Reviewed-by: kvn, iveresov, mchung
make/CompileJavaModules.gmk
make/common/Modules.gmk
--- a/make/CompileJavaModules.gmk	Fri Apr 28 10:46:06 2017 +0200
+++ b/make/CompileJavaModules.gmk	Thu Apr 27 23:06:33 2017 -0700
@@ -461,12 +461,28 @@
 # -parameters provides method's parameters information in class file,
 # JVMCI compilers make use of that information for various sanity checks.
 # Don't use Indy strings concatenation to have good JVMCI startup performance.
+# The exports are needed since JVMCI is dynamically exported (see
+# jdk.vm.ci.services.internal.ReflectionAccessJDK::openJVMCITo).
 
 jdk.internal.vm.ci_ADD_JAVAC_FLAGS := -parameters -Xlint:-exports -XDstringConcat=inline
 
 ################################################################################
 
-jdk.internal.vm.compiler_ADD_JAVAC_FLAGS := -parameters -XDstringConcat=inline
+jdk.internal.vm.compiler_ADD_JAVAC_FLAGS := -parameters -XDstringConcat=inline \
+    --add-exports jdk.internal.vm.ci/jdk.vm.ci.aarch64=jdk.internal.vm.compiler \
+    --add-exports jdk.internal.vm.ci/jdk.vm.ci.amd64=jdk.internal.vm.compiler \
+    --add-exports jdk.internal.vm.ci/jdk.vm.ci.code=jdk.internal.vm.compiler \
+    --add-exports jdk.internal.vm.ci/jdk.vm.ci.code.site=jdk.internal.vm.compiler \
+    --add-exports jdk.internal.vm.ci/jdk.vm.ci.code.stack=jdk.internal.vm.compiler \
+    --add-exports jdk.internal.vm.ci/jdk.vm.ci.common=jdk.internal.vm.compiler \
+    --add-exports jdk.internal.vm.ci/jdk.vm.ci.hotspot=jdk.internal.vm.compiler \
+    --add-exports jdk.internal.vm.ci/jdk.vm.ci.hotspot.aarch64=jdk.internal.vm.compiler \
+    --add-exports jdk.internal.vm.ci/jdk.vm.ci.hotspot.amd64=jdk.internal.vm.compiler \
+    --add-exports jdk.internal.vm.ci/jdk.vm.ci.hotspot.sparc=jdk.internal.vm.compiler \
+    --add-exports jdk.internal.vm.ci/jdk.vm.ci.meta=jdk.internal.vm.compiler \
+    --add-exports jdk.internal.vm.ci/jdk.vm.ci.runtime=jdk.internal.vm.compiler \
+    --add-exports jdk.internal.vm.ci/jdk.vm.ci.sparc=jdk.internal.vm.compiler \
+    #
 
 jdk.internal.vm.compiler_EXCLUDES += \
     org.graalvm.compiler.core.match.processor \
@@ -502,7 +518,27 @@
 
 ################################################################################
 
-jdk.aot_ADD_JAVAC_FLAGS := -parameters -XDstringConcat=inline
+# -parameters provides method's parameters information in class file,
+# JVMCI compilers make use of that information for various sanity checks.
+# Don't use Indy strings concatenation to have good JAOTC startup performance.
+# The exports are needed since JVMCI is dynamically exported (see
+# jdk.vm.ci.services.internal.ReflectionAccessJDK::openJVMCITo).
+
+jdk.aot_ADD_JAVAC_FLAGS := -parameters -XDstringConcat=inline \
+    --add-exports jdk.internal.vm.ci/jdk.vm.ci.aarch64=jdk.internal.vm.compiler,jdk.aot \
+    --add-exports jdk.internal.vm.ci/jdk.vm.ci.amd64=jdk.internal.vm.compiler,jdk.aot \
+    --add-exports jdk.internal.vm.ci/jdk.vm.ci.code=jdk.internal.vm.compiler,jdk.aot \
+    --add-exports jdk.internal.vm.ci/jdk.vm.ci.code.site=jdk.internal.vm.compiler,jdk.aot \
+    --add-exports jdk.internal.vm.ci/jdk.vm.ci.code.stack=jdk.internal.vm.compiler,jdk.aot \
+    --add-exports jdk.internal.vm.ci/jdk.vm.ci.common=jdk.internal.vm.compiler,jdk.aot \
+    --add-exports jdk.internal.vm.ci/jdk.vm.ci.hotspot=jdk.internal.vm.compiler,jdk.aot \
+    --add-exports jdk.internal.vm.ci/jdk.vm.ci.hotspot.aarch64=jdk.internal.vm.compiler,jdk.aot \
+    --add-exports jdk.internal.vm.ci/jdk.vm.ci.hotspot.amd64=jdk.internal.vm.compiler,jdk.aot \
+    --add-exports jdk.internal.vm.ci/jdk.vm.ci.hotspot.sparc=jdk.internal.vm.compiler,jdk.aot \
+    --add-exports jdk.internal.vm.ci/jdk.vm.ci.meta=jdk.internal.vm.compiler,jdk.aot \
+    --add-exports jdk.internal.vm.ci/jdk.vm.ci.runtime=jdk.internal.vm.compiler,jdk.aot \
+    --add-exports jdk.internal.vm.ci/jdk.vm.ci.sparc=jdk.internal.vm.compiler,jdk.aot \
+    #
 
 ################################################################################
 
--- a/make/common/Modules.gmk	Fri Apr 28 10:46:06 2017 +0200
+++ b/make/common/Modules.gmk	Thu Apr 27 23:06:33 2017 -0700
@@ -79,11 +79,14 @@
     java.xml.bind \
     java.xml.ws \
     java.xml.ws.annotation \
+    jdk.internal.vm.compiler \
     #
 
 # Modules explicitly declared as not being upgradeable even though they require
 # an upgradeable module.
-NON_UPGRADEABLE_MODULES +=
+NON_UPGRADEABLE_MODULES += \
+    jdk.aot \
+    #
 
 AGGREGATOR_MODULES += \
     java.se \
@@ -109,7 +112,6 @@
     jdk.crypto.ec \
     jdk.dynalink \
     jdk.incubator.httpclient \
-    jdk.internal.vm.compiler \
     jdk.jsobject \
     jdk.localedata \
     jdk.naming.dns \