Skip to content

Commit

Permalink
Add s390x support for Bazel
Browse files Browse the repository at this point in the history
Hello,

Please help in adding following changes to support s390x for Bazel.

1. jdk21 support.
2. jq support.
3. Python version upgrade as test run fails on s390x with 3.8

Thanks and Regards,
Sangita

Closes bazelbuild#23222.

PiperOrigin-RevId: 676478384
Change-Id: Iaa904d85a661391253e6e5c210ef4fafc1c047af
  • Loading branch information
sangitanalkar authored and fmeum committed Sep 20, 2024
1 parent e305848 commit 43fe014
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 8 deletions.
12 changes: 10 additions & 2 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,7 @@ use_repo(
"remotejdk17_win",
"remotejdk17_win_arm64",
"remotejdk21_linux",
"remotejdk21_linux_s390x",
"remotejdk21_macos",
"remotejdk21_macos_aarch64",
"remotejdk21_win",
Expand All @@ -269,12 +270,12 @@ use_repo(
# =========================================

python = use_extension("@rules_python//python/extensions:python.bzl", "python")
python.toolchain(python_version = "3.8")
python.toolchain(python_version = "3.10")

pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
pip.parse(
hub_name = "bazel_pip_dev_deps",
python_version = "3.8",
python_version = "3.10",
requirements_lock = "//:requirements.txt",
)
use_repo(pip, "bazel_pip_dev_deps")
Expand Down Expand Up @@ -333,6 +334,13 @@ http_file(
urls = ["https://github.com/jqlang/jq/releases/download/jq-1.7.1/jq-linux-arm64"],
)

http_file(
name = "jq_linux_s390x",
executable = True,
integrity = "sha256-hot8PKdCJKAt22EyYd38LkOxLart1etYNz29x/LF+SQ=",
urls = ["https://github.com/jqlang/jq/releases/download/jq-1.7.1/jq-linux-s390x"],
)

http_file(
name = "jq_macos_amd64",
executable = True,
Expand Down
12 changes: 6 additions & 6 deletions MODULE.bazel.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions scripts/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ filegroup(
srcs = select({
"@platforms//cpu:arm64": ["@jq_linux_arm64//file"],
"@platforms//cpu:x86_64": ["@jq_linux_amd64//file"],
"@platforms//cpu:s390x": ["@jq_linux_s390x//file"],
}),
)

Expand Down

0 comments on commit 43fe014

Please sign in to comment.