From ada5560415f4dd22b2c68be8493509d28b3306df Mon Sep 17 00:00:00 2001 From: Qinghui Xu Date: Mon, 27 May 2024 14:30:20 +0200 Subject: [PATCH] Fix bazel build In recent bazel versions, `exec_tools` attribute has been removed from `genrule` cf. https://github.com/bazelbuild/bazel/issues/19132 --- build_defs/internal_shell.bzl | 4 ++-- src/google/protobuf/BUILD.bazel | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/build_defs/internal_shell.bzl b/build_defs/internal_shell.bzl index 649184a5184c..91628a5e57f5 100644 --- a/build_defs/internal_shell.bzl +++ b/build_defs/internal_shell.bzl @@ -32,7 +32,7 @@ def inline_sh_binary( native.genrule( name = name + "_genrule", srcs = srcs, - exec_tools = tools, + tools = tools, outs = [name + ".sh"], cmd = "cat <<'EOF' >$(OUTS)\n#!/bin/bash -exu\n%s\nEOF\n" % cmd, visibility = ["//visibility:private"], @@ -77,7 +77,7 @@ def inline_sh_test( native.genrule( name = name + "_genrule", srcs = srcs, - exec_tools = tools, + tools = tools, outs = [name + ".sh"], cmd = "cat <<'EOF' >$(OUTS)\n#!/bin/bash -exu\n%s\nEOF\n" % cmd, visibility = ["//visibility:private"], diff --git a/src/google/protobuf/BUILD.bazel b/src/google/protobuf/BUILD.bazel index aec8130a06ca..f2c8dd8fa837 100644 --- a/src/google/protobuf/BUILD.bazel +++ b/src/google/protobuf/BUILD.bazel @@ -138,7 +138,7 @@ genrule( --proto_path=$$(dirname $$(dirname $$(dirname $(location any.proto)))) \ $(SRCS) """, - exec_tools = ["//:protoc"], + tools = ["//:protoc"], visibility = ["//visibility:private"], )