Skip to content

Commit 8f61c43

Browse files
committed
Added e2k architecture definition
Signed-off-by: r-a-sattarov <r.a.sattarov@yandex.ru>
1 parent 87f4647 commit 8f61c43

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

native-platform/src/main/java/net/rubygrapefruit/platform/SystemInfo.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
*/
2222
@ThreadSafe
2323
public interface SystemInfo extends NativeIntegration {
24-
enum Architecture { i386, amd64, aarch64 }
24+
enum Architecture { i386, amd64, aarch64, e2k }
2525

2626
/**
2727
* Returns the name of the kernel for the current operating system.

native-platform/src/main/java/net/rubygrapefruit/platform/internal/MutableSystemInfo.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,9 @@ public Architecture getArchitecture() {
6262
if (machineArchitecture.equals("aarch64") || machineArchitecture.equals("arm64")) {
6363
return Architecture.aarch64;
6464
}
65+
if (machineArchitecture.equals("e2k")) {
66+
return Architecture.e2k;
67+
}
6568
throw new NativeException(String.format("Cannot determine architecture from kernel architecture name '%s'.", machineArchitecture));
6669
}
6770

native-platform/src/main/java/net/rubygrapefruit/platform/internal/Platform.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ public static Platform current() {
6262
platform = new Linux32Bit();
6363
} else if (arch.equals("aarch64")) {
6464
platform = new LinuxAarch64();
65+
} else if (arch.equals("e2k")) {
66+
platform = new LinuxE2K();
6567
}
6668
} else if (osName.contains("os x") || osName.contains("darwin")) {
6769
if (arch.equals("i386")) {
@@ -306,6 +308,13 @@ public String getId() {
306308
}
307309
}
308310

311+
private static class LinuxE2K extends Linux {
312+
@Override
313+
public String getId() {
314+
return "linux-e2k";
315+
}
316+
}
317+
309318
private abstract static class FreeBSD extends Unix {
310319
@Override
311320
public List<String> getLibraryVariants() {

0 commit comments

Comments
 (0)