Skip to content

Commit

Permalink
[GR-32642] Backport to 20.3 : Native image bash launcher version and …
Browse files Browse the repository at this point in the history
…vm config #3329.

PullRequest: graal/9484
  • Loading branch information
marwan-hallaoui committed Aug 4, 2021
2 parents 4d0ee64 + dd88f05 commit fce61b5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public boolean consume(Queue<String> args) {
if (NativeImage.IS_AOT) {
message = System.getProperty("java.vm.version");
} else {
message = NativeImage.graalvmVersion;
message = "native-image " + NativeImage.graalvmVersion + " " + NativeImage.graalvmConfig;
}
message += " (Java Version " + javaRuntimeVersion + ")";
nativeImage.showMessage(message);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ private static String getPlatform() {
}

static final String graalvmVersion = System.getProperty("org.graalvm.version", "dev");
static final String graalvmConfig = System.getProperty("org.graalvm.config", "CE");

private static Map<String, String[]> getCompilerFlags() {
Map<String, String[]> result = new HashMap<>();
Expand Down Expand Up @@ -728,6 +729,7 @@ private void prepareImageBuildArgs() {
addImageBuilderJavaArgs("-Djava.awt.headless=true");
}
addImageBuilderJavaArgs("-Dorg.graalvm.version=" + graalvmVersion);
addImageBuilderJavaArgs("-Dorg.graalvm.config=" + graalvmConfig);
addImageBuilderJavaArgs("-Dcom.oracle.graalvm.isaot=true");
addImageBuilderJavaArgs("-Djava.system.class.loader=" + CUSTOM_SYSTEM_CLASS_LOADER);
/*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ public void afterRegistration(AfterRegistrationAccess access) {
}

protected VM createVMSingletonValue() {
return new VM("CE");
String config = System.getProperty("org.graalvm.config", "CE");
return new VM(config);
}

@Override
Expand Down

0 comments on commit fce61b5

Please sign in to comment.