Skip to content

Commit

Permalink
update to jdk11 jvmci-19.3-b04
Browse files Browse the repository at this point in the history
  • Loading branch information
dougxc committed Nov 4, 2019
1 parent a891325 commit da65dd0
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 25 deletions.
4 changes: 2 additions & 2 deletions common.hocon
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ jdks: {
oraclejdk8Debug: {name : oraclejdk, version : "8u231-jvmci-19.3-b04-fastdebug", platformspecific: true}
oraclejdk11: {name : oraclejdk, version : "11.0.3+12", platformspecific: true}
openjdk11: {name : openjdk, version : "11.0.3+7", platformspecific: true}
labsjdk-ce-11: {name : labsjdk, version : "ce-11.0.5+9-jvmci-19.3-b03", platformspecific: true}
labsjdk-ee-11: {name : labsjdk, version : "ee-11.0.5+1-jvmci-19.3-b03", platformspecific: true}
labsjdk-ce-11: {name : labsjdk, version : "ce-11.0.5+10-jvmci-19.3-b04-dev", platformspecific: true}
labsjdk-ee-11: {name : labsjdk, version : "ee-11.0.5+10-jvmci-19.3-b04-dev", platformspecific: true}
}

# This must always point to HEAD in the master branch but can be used to point
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
*/
public final class JVMCIVersionCheck {

private static final Version JVMCI8_MIN_VERSION = new Version3(19, 3, 2);
private static final Version JVMCI_MIN_VERSION = new Version3(19, 3, 4);

public interface Version {
boolean isLessThan(Version other);
Expand Down Expand Up @@ -145,18 +145,22 @@ public String toString() {
}
}

private static void failVersionCheck(Map<String, String> props, boolean exit, String reason, Object... args) {
private void failVersionCheck(boolean exit, String reason, Object... args) {
Formatter errorMessage = new Formatter().format(reason, args);
String javaHome = props.get("java.home");
String vmName = props.get("java.vm.name");
errorMessage.format("Set the JVMCI_VERSION_CHECK environment variable to \"ignore\" to suppress ");
errorMessage.format("this error or to \"warn\" to emit a warning and continue execution.%n");
errorMessage.format("Currently used Java home directory is %s.%n", javaHome);
errorMessage.format("Currently used VM configuration is: %s%n", vmName);
if (props.get("java.specification.version").compareTo("1.9") < 0) {
if (javaSpecVersion.compareTo("1.9") < 0) {
errorMessage.format("Download the latest JVMCI JDK 8 from https://github.com/graalvm/openjdk8-jvmci-builder/releases");
} else {
errorMessage.format("Download JDK 11 or later.");
if (javaSpecVersion.compareTo("11") == 0 && vmVersion.contains("-jvmci-")) {
errorMessage.format("Download the latest Labs OpenJDK 11 from https://github.com/graalvm/labs-openjdk-11/releases");
} else {
errorMessage.format("Download JDK 11 or later.");
}
}
String value = System.getenv("JVMCI_VERSION_CHECK");
if ("warn".equals(value)) {
Expand All @@ -183,7 +187,7 @@ private JVMCIVersionCheck(Map<String, String> props, String javaSpecVersion, Str

static void check(Map<String, String> props, boolean exitOnFailure) {
JVMCIVersionCheck checker = new JVMCIVersionCheck(props, props.get("java.specification.version"), props.get("java.vm.version"));
checker.run(exitOnFailure, JVMCI8_MIN_VERSION);
checker.run(exitOnFailure, JVMCI_MIN_VERSION);
}

/**
Expand All @@ -202,14 +206,14 @@ private void run(boolean exitOnFailure, Version minVersion) {
Version v = Version.parse(vmVersion);
if (v != null) {
if (v.isLessThan(minVersion)) {
failVersionCheck(props, exitOnFailure, "The VM does not support the minimum JVMCI API version required by Graal: %s < %s.%n", v, minVersion);
failVersionCheck(exitOnFailure, "The VM does not support the minimum JVMCI API version required by Graal: %s < %s.%n", v, minVersion);
}
return;
}
failVersionCheck(props, exitOnFailure, "The VM does not support the minimum JVMCI API version required by Graal.%n" +
failVersionCheck(exitOnFailure, "The VM does not support the minimum JVMCI API version required by Graal.%n" +
"Cannot read JVMCI version from java.vm.version property: %s.%n", vmVersion);
} else if (javaSpecVersion.compareTo("11") < 0) {
failVersionCheck(props, exitOnFailure, "Graal is not compatible with the JVMCI API in JDK 9 and 10.%n");
failVersionCheck(exitOnFailure, "Graal is not compatible with the JVMCI API in JDK 9 and 10.%n");
} else {
if (vmVersion.contains("SNAPSHOT")) {
return;
Expand All @@ -218,28 +222,16 @@ private void run(boolean exitOnFailure, Version minVersion) {
// Allow local builds
return;
}
if (vmVersion.startsWith("11-ea+")) {
String buildString = vmVersion.substring("11-ea+".length());
try {
int build = Integer.parseInt(buildString);
if (build < 20) {
failVersionCheck(props, exitOnFailure, "Graal requires build 20 or later of JDK 11 early access binary, got build %d.%n", build);
return;
}
} catch (NumberFormatException e) {
failVersionCheck(props, exitOnFailure, "Could not parse the JDK 11 early access build number from java.vm.version property: %s.%n", vmVersion);
return;
}
} else if (vmVersion.contains("-jvmci-")) {
if (vmVersion.contains("-jvmci-")) {
// A "labsjdk"
Version v = Version.parse(vmVersion);
if (v != null) {
if (v.isLessThan(minVersion)) {
failVersionCheck(props, exitOnFailure, "The VM does not support the minimum JVMCI API version required by Graal: %s < %s.%n", v, minVersion);
failVersionCheck(exitOnFailure, "The VM does not support the minimum JVMCI API version required by Graal: %s < %s.%n", v, minVersion);
}
return;
}
failVersionCheck(props, exitOnFailure, "The VM does not support the minimum JVMCI API version required by Graal.%n" +
failVersionCheck(exitOnFailure, "The VM does not support the minimum JVMCI API version required by Graal.%n" +
"Cannot read JVMCI version from java.vm.version property: %s.%n", vmVersion);
} else {
// Graal is compatible with all JDK versions as of 11 GA.
Expand Down

0 comments on commit da65dd0

Please sign in to comment.