Skip to content

Commit

Permalink
Support for AIX OS on ppc64
Browse files Browse the repository at this point in the history
  • Loading branch information
ritvick authored and deepy committed Sep 27, 2024
1 parent da4fbb6 commit 5bfaef3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/kotlin/com/github/gradle/node/util/PlatformHelper.kt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ fun parseOsName(name: String): String {
name.contains("linux") -> "linux"
name.contains("freebsd") -> "linux"
name.contains("sunos") -> "sunos"
name.contains("aix") -> "aix"
else -> error("Unsupported OS: $name")
}
}
Expand All @@ -26,6 +27,7 @@ fun parseOsArch(arch: String, uname: Callable<String>): String {
arch == "arm" || arch.startsWith("aarch") -> uname.call()
.mapIf({ it == "armv8l" || it == "aarch64" }) { "arm64" }
.mapIf({ it == "x86_64" }) {"x64"}
arch == "ppc64" -> "ppc64"
arch == "ppc64le" -> "ppc64le"
arch == "s390x" -> "s390x"
arch.contains("64") -> "x64"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ class PlatformHelperTest extends Specification {
'Linux' | 's390x' | 'linux' | 's390x' | false
'SunOS' | 'x86' | 'sunos' | 'x86' | false
'SunOS' | 'x86_64' | 'sunos' | 'x64' | false
'AIX' | 'ppc64' | 'aix' | 'ppc64' | false
}

@Unroll
Expand Down

0 comments on commit 5bfaef3

Please sign in to comment.