Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Native image bash launcher version and vm config #3329

Merged
merged 2 commits into from
Apr 9, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,12 @@ public boolean consume(ArgumentQueue args) {
case "--version":
args.poll();
singleArgumentCheck(args, headArg);
String message = System.getProperty("java.vm.version");
String message;
if (NativeImage.IS_AOT) {
message = System.getProperty("java.vm.version");
} else {
message = "native-image " + NativeImage.graalvmVersion + " " + NativeImage.graalvmConfig;
}
message += " (Java Version " + javaRuntimeVersion + ")";
nativeImage.showMessage(message);
System.exit(0);
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