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

Kiwi1969 patch 1 #10990

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
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 @@ -484,7 +484,12 @@ enum OS {
*
* @since 23.1
*/
WINDOWS("windows");
WINDOWS("windows"),

/**
* The IBM z/OS operating system.
*/
ZOS("z/OS");

private final String id;

Expand Down Expand Up @@ -517,6 +522,8 @@ public static OS getCurrent() {
return DARWIN;
} else if (os.toLowerCase().startsWith("windows")) {
return WINDOWS;
} else if (os.equalsIgnoreCase("z/OS")) {
return ZOS;
} else {
throw CompilerDirectives.shouldNotReachHere("Unsupported OS name " + os);
}
Expand All @@ -542,7 +549,13 @@ enum CPUArchitecture {
*
* @since 23.1
*/
AMD64("amd64");
AMD64("amd64"),

/**
* The IBM s390x 64-bit architecture.
*
*/
S390X("s390x");

private final String id;

Expand Down Expand Up @@ -573,6 +586,7 @@ public static CPUArchitecture getCurrent() {
return switch (arch) {
case "amd64", "x86_64" -> AMD64;
case "aarch64", "arm64" -> AARCH64;
case "s390x" -> S390X;
default -> throw CompilerDirectives.shouldNotReachHere("Unsupported CPU architecture " + arch);
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,7 @@ private static ResolvedCacheFolder findCacheRootDefault() {
yield userCacheDir;
}
case WINDOWS -> new ResolvedCacheFolder(userHome.resolve(Path.of("AppData", "Local")), "user home", userHome);
case ZOS -> new ResolvedCacheFolder(userHome.resolve(".cache"), "user home", userHome);
};
return container.resolve("org.graalvm.polyglot");
}
Expand Down