From 43fe0142668d4d7502efb211df024ea54d5dc9db Mon Sep 17 00:00:00 2001 From: "Sangita.Nalkar" Date: Thu, 19 Sep 2024 10:50:03 -0700 Subject: [PATCH] Add s390x support for Bazel 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 #23222. PiperOrigin-RevId: 676478384 Change-Id: Iaa904d85a661391253e6e5c210ef4fafc1c047af --- MODULE.bazel | 12 ++++++++++-- MODULE.bazel.lock | 12 ++++++------ scripts/BUILD | 1 + 3 files changed, 17 insertions(+), 8 deletions(-) diff --git a/MODULE.bazel b/MODULE.bazel index f39e3a60844c7b..82ba6dfc899c10 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -259,6 +259,7 @@ use_repo( "remotejdk17_win", "remotejdk17_win_arm64", "remotejdk21_linux", + "remotejdk21_linux_s390x", "remotejdk21_macos", "remotejdk21_macos_aarch64", "remotejdk21_win", @@ -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") @@ -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, diff --git a/MODULE.bazel.lock b/MODULE.bazel.lock index d4d76b270c54ec..f45da79831f702 100644 --- a/MODULE.bazel.lock +++ b/MODULE.bazel.lock @@ -5273,7 +5273,7 @@ }, "@@rules_python+//python/private/bzlmod:pip.bzl%pip_internal": { "general": { - "bzlTransitiveDigest": "1KLA+JO86fwZ1jWTGwqau6h3Yaf5DxuhX6TreBS8r/A=", + "bzlTransitiveDigest": "paCbMe3CKG5tc/zg9ShG/GVqkBhmHwcCEwVQCGyOsA0=", "usagesDigest": "spYTfmH5Mw462zD7a6kcJXCuJA9q0cpZZc4yYSSxiPw=", "recordedFileInputs": { "@@rules_python+//tools/publish/requirements_windows.txt": "0b7327c4f5751dc429bf53d21fc0797a7a0a6ac468ddcb38e238bed90ef0a7da", @@ -7330,7 +7330,7 @@ "importlib_metadata": "[{\"config_setting\":\"//_config:is_python_3.11\",\"filename\":\"importlib_metadata-6.0.0-py3-none-any.whl\",\"repo\":\"rules_python_publish_deps_311_importlib_metadata_py3_none_any_7efb448e\",\"target_platforms\":null,\"version\":\"3.11\"},{\"config_setting\":\"//_config:is_python_3.11\",\"filename\":\"importlib_metadata-6.0.0.tar.gz\",\"repo\":\"rules_python_publish_deps_311_importlib_metadata_sdist_e354bede\",\"target_platforms\":null,\"version\":\"3.11\"}]", "pywin32_ctypes": "[{\"config_setting\":\"//_config:is_python_3.11\",\"filename\":\"pywin32_ctypes-0.2.0-py2.py3-none-any.whl\",\"repo\":\"rules_python_publish_deps_311_pywin32_ctypes_py2_none_any_9dc2d991\",\"target_platforms\":null,\"version\":\"3.11\"},{\"config_setting\":\"//_config:is_python_3.11\",\"filename\":\"pywin32-ctypes-0.2.0.tar.gz\",\"repo\":\"rules_python_publish_deps_311_pywin32_ctypes_sdist_24ffc3b3\",\"target_platforms\":null,\"version\":\"3.11\"}]" }, - "default_version": "3.8", + "default_version": "3.10", "groups": {} } }, @@ -7628,13 +7628,13 @@ ], [ "rules_python++python+pythons_hub", - "python_3_11_host", - "rules_python++python+python_3_11_host" + "python_3_10_host", + "rules_python++python+python_3_10_host" ], [ "rules_python++python+pythons_hub", - "python_3_8_host", - "rules_python++python+python_3_8_host" + "python_3_11_host", + "rules_python++python+python_3_11_host" ] ] } diff --git a/scripts/BUILD b/scripts/BUILD index d25c00a925f455..4f3fdb813c0278 100644 --- a/scripts/BUILD +++ b/scripts/BUILD @@ -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"], }), )