Developing Graal now requires JDK 8

Doug Simon doug.simon at oracle.com
Thu Jan 26 19:57:04 UTC 2017


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?

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.

-Doug

[1] Which is complicated enough due to https://bugs.openjdk.java.net/browse/JDK-8155851
[2] labsjdk* at http://www.oracle.com/technetwork/oracle-labs/program-languages/downloads/index.html
[3] http://mail.openjdk.java.net/pipermail/graal-dev/2017-January/004796.html
[4] http://mail.openjdk.java.net/pipermail/graal-dev/2017-January/004800.html


More information about the graal-dev mailing list