Skip to content

Commit 8bdf33e

Browse files
Add s390x to list of supported cpu architecutres (#124)
Buf added support for s390x in 1.56. I would like to add s390x support to rules_buf for this version or greater.
1 parent db56a74 commit 8bdf33e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

buf/internal/toolchain.bzl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,14 +119,16 @@ def _buf_download_releases_impl(ctx):
119119
major_version = int(version_number[0])
120120
minor_version = int(version_number[1])
121121
os, cpu = _detect_host_platform(ctx)
122-
if os not in ["linux", "darwin", "windows"] or cpu not in ["arm64", "amd64", "ppc64le"]:
122+
if os not in ["linux", "darwin", "windows"] or cpu not in ["arm64", "amd64", "ppc64le", "s390x"]:
123123
fail("Unsupported operating system or cpu architecture ")
124124
if os == "linux" and cpu == "arm64":
125125
cpu = "aarch64"
126126
if cpu == "amd64":
127127
cpu = "x86_64"
128128
if cpu == "ppc64le" and (major_version < 1 or (major_version == 1 and minor_version < 54)):
129129
fail("Unsupported operating system or cpu architecture ")
130+
if cpu == "s390x" and (major_version < 1 or (major_version == 1 and minor_version < 56)):
131+
fail("Unsupported operating system or cpu architecture ")
130132

131133
ctx.report_progress("Downloading buf release hash")
132134
url = "{}/{}/sha256.txt".format(repository_url, version)

0 commit comments

Comments
 (0)