[11u] Remove the Experimental AOT and JIT Compiler
Hohensee, Paul
hohensee at amazon.com
Fri Oct 29 15:19:56 UTC 2021
Thanks, Christoph, will do. The patch also applies to 13 and 15.
Paul
-----Original Message-----
From: "Langer, Christoph" <christoph.langer at sap.com>
Date: Thursday, October 28, 2021 at 12:46 AM
To: "Hohensee, Paul" <hohensee at amazon.com>, "jdk-updates-dev at openjdk.java.net" <jdk-updates-dev at openjdk.java.net>
Subject: RE: [11u] Remove the Experimental AOT and JIT Compiler
Hi Paul,
first of all thanks for giving the heads up that Oracle also removed the AOT compiler in their JDK11 updates. I guess we should discuss if we want to follow on that one or if we don't touch OpenJDK 11u with regards to these options.
As for your proposed fix, I think it would be good to go into jdk11u-dev (and by that I guess it'll also be consumed by the grail project). Just open a bug/PR
Best regards
Christoph
> -----Original Message-----
> From: jdk-updates-dev <jdk-updates-dev-retn at openjdk.java.net> On
> Behalf Of Hohensee, Paul
> Sent: Mittwoch, 27. Oktober 2021 21:48
> To: jdk-updates-dev at openjdk.java.net
> Subject: [DMARC FAILURE] [11u] Remove the Experimental AOT and JIT
> Compiler
>
> Oracle has removed the Experimental AOT and JIT Compiler (Graal compiler)
> in 11.0.13, see
>
> https://www.oracle.com/java/technologies/javase/11all-
> relnotes.html#R11_0_13
>
> There doesn’t appear to be a JBS issue for this. I.e., there’s no 11.0.13
> backport issue for
>
> https://bugs.openjdk.java.net/browse/JDK-8263327
>
> or its sub-tasks.
>
> But, the Graal team seems to be maintaining an 11u port, see
>
> https://github.com/graalvm/labs-openjdk-11
>
> The current OpenJDK 11u implementation breaks the MacOS port on Big Sur
> 11.0.1. We have a patch (see below) which we can submit to the Graal
> project.
>
> The larger question is, do the Maintainers want to follow Oracle and remove
> the Graal compiler from 11u? If not, we’ll also file a JBS issue against OpenJDK
> 11u.
>
> Thanks,
> Paul
>
>
> diff --git
> a/src/jdk.aot/share/classes/jdk.tools.jaotc/src/jdk/tools/jaotc/Linker.java
> b/src/jdk.aot/share/classes/jdk.tools.jaotc/src/jdk/tools/jaotc/Linker.java
> index 92c80aad397..d0a01eeb3a6 100644
> --- a/src/jdk.aot/share/classes/jdk.tools.jaotc/src/jdk/tools/jaotc/Linker.java
> +++
> b/src/jdk.aot/share/classes/jdk.tools.jaotc/src/jdk/tools/jaotc/Linker.java
> @@ -97,8 +97,9 @@ final class Linker {
> objectFileName = name.substring(0, name.length() -
> ".dylib".length());
> }
> objectFileName = objectFileName + ".o";
> + Path libPath = Paths.get(getMacOSLibPath().toString(), "usr/lib");
> linkerPath = (options.linkerpath != null) ? options.linkerpath : "ld";
> - linkerCmd = linkerPath + " -dylib -o " + libraryFileName + " " +
> objectFileName;
> + linkerCmd = linkerPath + " -dylib -o " + libraryFileName + " " +
> objectFileName + " -L" + libPath.toString() + " -lSystem";
> linkerCheck = linkerPath + " -v";
> break;
> default:
> @@ -266,5 +267,21 @@ final class Linker {
> return wkp;
> }
> }
> +
> + private static Path getMacOSLibPath() throws Exception {
> + ProcessBuilder processBuilder = new ProcessBuilder("xcrun", "--show-
> sdk-path");
> + processBuilder.redirectOutput(ProcessBuilder.Redirect.PIPE);
> + processBuilder.redirectError(ProcessBuilder.Redirect.PIPE);
> + Process process = processBuilder.start();
> + final int exitCode = process.waitFor();
> + if (exitCode != 0) {
> + String errorMessage = getString(process.getErrorStream());
> + if (errorMessage.isEmpty()) {
> + errorMessage = getString(process.getInputStream());
> + }
> + throw new IllegalStateException("xcrun could not find path for SDK.
> Error: " + errorMessage);
> + }
> + return
> Paths.get(getLines(process.getInputStream()).findFirst().orElseThrow(() ->
> new IllegalStateException("Unexpected empty output from xcrun")));
> + }
> // @formatter:on
> }
More information about the jdk-updates-dev
mailing list