Developing Graal now requires JDK 8
Alan Bateman
Alan.Bateman at oracle.com
Thu Jan 26 22:06:36 UTC 2017
On 26/01/2017 19:57, Doug Simon wrote:
> Hi jigsaw experts,
>
> As detailed in https://bugs.openjdk.java.net/browse/JDK-8171448, we are now in the unfortunate position of being forced to use a JDK 8 in the ongoing development of Graal. In particular, given the fine grained way we compose the jdk.vm.compiler module[1] (i.e., we don’t compile all its sources in one javac compilation) we now need to compile Graal (sources and tests) with javac from JDK 8. Using javac from JDK 9 always picks up the jdk.vm.compiler classes in the JDK instead of the newer version of the classes. It may be a naive suggestion, but what we’d really like is support for module exclusion (e.g., --exclude-modules=jdk.vm.compiler).
>
> To help me understand if there’s an existing solution I’m missing, can someone please tell me how a change in some java.base API would be developed. For example, suppose that this method is added to String:
>
> String truncate(int trailingCharsToChop) { ... }
>
> How would other code in the java.base module be compiled against the new API? By virtue of being compiled along with the new String source file?
>
> What about compiling code in other modules (or tests) that wants to use the new method? That is, how does one convince javac to see the new API?
This should do it:
javac -Xmodule:java.base -d patch String.java
// compile module against the patched java.base
javac --patch-module java.base=patch ...
// run with the patched java.base
java --patch-module java.base=patch ...
> Note that this constraint is particular painful for the AArch64 Graal port. The version of JDK 8 we use[2] includes a port of JVMCI (that we hope to get into an official JDK 8u backport). However, there is no such bundle for AArch64 so hacky workarounds are required[3][4].
>
> Any light you can shed on how we can develop Graal with (only) a JDK >8 would be much appreciated.
>
It seems to me that you really want to override jdk.vm.compiler and
maybe we should explore again making this an upgradeable module.
-Alan
More information about the graal-dev
mailing list