Skip to content

Commit

Permalink
Add config to bash launcher version output
Browse files Browse the repository at this point in the history
  • Loading branch information
zakkak committed Apr 7, 2021
1 parent 98429a1 commit b45da10
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 @@ -85,7 +85,7 @@ public boolean consume(ArgumentQueue args) {
if (NativeImage.IS_AOT) {
message = System.getProperty("java.vm.version");
} else {
message = NativeImage.graalvmVersion;
message = "native-image " + NativeImage.graalvmVersion + " " + System.getProperty("org.graalvm.config", "CE");
}
message += " (Java Version " + javaRuntimeVersion + ")";
nativeImage.showMessage(message);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,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 @@ -813,6 +814,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 b45da10

Please sign in to comment.