[llvm] Replace `exec_tools` with `tools` in bazel genrule. (PR #77510)

via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 9 10:58:01 PST 2024


https://github.com/denglesberg-splunk created https://github.com/llvm/llvm-project/pull/77510

As of the Bazel 6.x series, there is no difference between the `exec_tools` and `tools`. Bazel 7 removes the `exec_tools` attribute entirely. This commit updates to use the cannonical attribute name to allow building `clang-tidy``with bazel 7.0.0, though it does not change the default bazel version which remains at 6.1.2.

See also https://github.com/bazelbuild/bazel/issues/19132 for more information.

>From c6c7a35cf95d130282eac7dd9dd6a6cca630a79c Mon Sep 17 00:00:00 2001
From: Derek Englesberg <denglesberg at splunk.com>
Date: Tue, 9 Jan 2024 13:51:23 -0500
Subject: [PATCH] Replace `exec_tools` with `tools` in bazel genrule.

As of the Bazel 6.x series, there is no difference between the `exec_tools` and
`tools`. Bazel 7 removes the `exec_tools` attribute entirely. This commit
updates to use the cannonical attribute name to allow building
`clang-tidy``with bazel 7.0.0, though it does not change the default bazel
version which remains at 6.1.2.

See also https://github.com/bazelbuild/bazel/issues/19132 for more information.
---
 .../clang-tools-extra/clang-tidy/BUILD.bazel                    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/utils/bazel/llvm-project-overlay/clang-tools-extra/clang-tidy/BUILD.bazel b/utils/bazel/llvm-project-overlay/clang-tools-extra/clang-tidy/BUILD.bazel
index bbabc5397e9893..317863de3b36ca 100644
--- a/utils/bazel/llvm-project-overlay/clang-tools-extra/clang-tidy/BUILD.bazel
+++ b/utils/bazel/llvm-project-overlay/clang-tools-extra/clang-tidy/BUILD.bazel
@@ -57,7 +57,7 @@ genrule(
     srcs = ["misc/ConfusableTable/confusables.txt"],
     outs = ["Confusables.inc"],
     cmd = "$(location :confusable_table_builder) $(SRCS) $(OUTS)",
-    exec_tools = [":confusable_table_builder"],
+    tools = [":confusable_table_builder"],
     visibility = ["//visibility:private"],
 )
 



More information about the llvm-commits mailing list