Skip to content
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 @@ -24,7 +24,6 @@
*/
package com.oracle.svm.core;

import org.graalvm.nativeimage.ImageInfo;
import org.graalvm.nativeimage.Platform;
import org.graalvm.nativeimage.Platforms;

Expand All @@ -40,8 +39,8 @@ public final class VM {
public VM(String vmInfo) {
info = vmInfo;
version = getVersion();
vendor = System.getProperty("org.graalvm.vendor", "GraalVM Community");
vendorUrl = System.getProperty("org.graalvm.vendorurl", "https://www.graalvm.org/");
vendor = getVendor();
vendorUrl = getVendorUrl();
vendorVersion = getVendorVersion();
}

Expand All @@ -50,12 +49,18 @@ public static String getSupportUrl() {
return System.getProperty("org.graalvm.supporturl", "https://graalvm.org/native-image/error-report/");
}

@Platforms(Platform.HOSTED_ONLY.class)
public static String getVendor() {
return System.getProperty("org.graalvm.vendor", "GraalVM Community");
}

@Platforms(Platform.HOSTED_ONLY.class)
public static String getVendorUrl() {
return System.getProperty("org.graalvm.vendorurl", "https://www.graalvm.org/");
}

public static String getVendorVersion() {
if (ImageInfo.inImageRuntimeCode()) {
return System.getProperty("java.vendor.version");
} else {
return System.getProperty("org.graalvm.vendorversion", "GraalVM CE");
}
return System.getProperty("org.graalvm.vendorversion", System.getProperty("java.vendor.version", ""));
}

@Platforms(Platform.HOSTED_ONLY.class)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@
import com.oracle.svm.core.OS;
import com.oracle.svm.core.SubstrateOptions;
import com.oracle.svm.core.SubstrateUtil;
import com.oracle.svm.core.VM;
import com.oracle.svm.core.option.BundleMember;
import com.oracle.svm.core.option.OptionUtils;
import com.oracle.svm.core.option.SubstrateOptionsParser;
Expand Down Expand Up @@ -112,9 +113,10 @@ private static String getPlatform() {
return (OS.getCurrent().className + "-" + SubstrateUtil.getArchitectureName()).toLowerCase();
}

static final String graalvmVendor = System.getProperty("org.graalvm.vendor", "GraalVM Community");
static final String graalvmVendorUrl = System.getProperty("org.graalvm.vendorurl", "https://www.graalvm.org/");
static final String graalvmVendorVersion = System.getProperty("org.graalvm.vendorversion", "GraalVM CE");
static final String graalvmVendor = VM.getVendor();
static final String graalvmVendorUrl = VM.getVendorUrl();
static final String graalvmVendorVersion = VM.getVendorVersion();
static final String graalvmVersion = System.getProperty("org.graalvm.version", "dev");

private static Map<String, String[]> getCompilerFlags() {
Map<String, String[]> result = new HashMap<>();
Expand Down Expand Up @@ -820,6 +822,7 @@ private void prepareImageBuildArgs() {
addImageBuilderJavaArgs("-Dorg.graalvm.vendor=" + graalvmVendor);
addImageBuilderJavaArgs("-Dorg.graalvm.vendorurl=" + graalvmVendorUrl);
addImageBuilderJavaArgs("-Dorg.graalvm.vendorversion=" + graalvmVendorVersion);
addImageBuilderJavaArgs("-Dorg.graalvm.version=" + graalvmVersion);
addImageBuilderJavaArgs("-Dcom.oracle.graalvm.isaot=true");
addImageBuilderJavaArgs("-Djava.system.class.loader=" + CUSTOM_SYSTEM_CLASS_LOADER);

Expand Down Expand Up @@ -1519,7 +1522,7 @@ protected int buildImage(List<String> javaArgs, LinkedHashSet<Path> cp, LinkedHa

/**
* Adds a shutdown hook to kill the image builder process if it's still alive.
*
*
* @param p image builder process
*/
private static void installImageBuilderCleanupHook(Process p) {
Expand Down