Skip to content

Commit

Permalink
Add support for LoongArch64 architecture (#63)
Browse files Browse the repository at this point in the history
Motivation:

`os-maven-plugin` doesn't recognize `loongarch64` from `os.arch` property.

Modifications:

- Return `loongarch_64` for `loongarch64`.

Result:

- `os-maven-plugin` now supports `loongarch64`.
  • Loading branch information
zhangwenlong8911 authored Nov 7, 2022
1 parent 4df5494 commit cebc3e8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
* `riscv` if the value is `riscv` or `riscv32`
* `riscv64` if the value is `riscv64`
* `e2k` if the value is `e2k`
* `loongarch_64` if the value is `loongarch64`

Note: The bitness part of this property relies on the bitness of the JVM binary, e.g. You'll get the property that ends with `_32` if you run a 32-bit JVM on a 64-bit OS.

Expand Down
3 changes: 3 additions & 0 deletions src/main/java/kr/motd/maven/os/Detector.java
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,9 @@ private static String normalizeArch(String value) {
if ("e2k".equals(value)) {
return "e2k";
}
if ("loongarch64".equals(value)) {
return "loongarch_64";
}
return UNKNOWN;
}

Expand Down

0 comments on commit cebc3e8

Please sign in to comment.