Skip to content

Commit 3903cb4

Browse files
authored
[bazel] Use rules_python load statements (#113213)
With bazel 8.x these are strongly encouraged, and this disambiguates which version of these rules we get for older versions. Specifically the native.py_test was using the wrong version of py_test.
1 parent 009fb56 commit 3903cb4

File tree

4 files changed

+5
-2
lines changed

4 files changed

+5
-2
lines changed

utils/bazel/llvm-project-overlay/clang/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# See https://llvm.org/LICENSE.txt for license information.
33
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
44

5+
load("@rules_python//python:defs.bzl", "py_binary")
56
load(
67
"//:vars.bzl",
78
"LLVM_VERSION_MAJOR",

utils/bazel/llvm-project-overlay/lldb/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ load("@bazel_skylib//lib:selects.bzl", "selects")
66
load("@bazel_skylib//rules:common_settings.bzl", "bool_flag")
77
load("@bazel_skylib//rules:expand_template.bzl", "expand_template")
88
load("@build_bazel_apple_support//rules:apple_genrule.bzl", "apple_genrule")
9+
load("@rules_python//python:defs.bzl", "py_binary")
910
load("//:vars.bzl", "LLVM_VERSION_MAJOR", "LLVM_VERSION_MINOR", "LLVM_VERSION_PATCH", "LLVM_VERSION_SUFFIX", "PACKAGE_VERSION")
1011
load("//lldb/source/Plugins:plugin_config.bzl", "DEFAULT_PLUGINS", "DEFAULT_SCRIPT_PLUGINS", "OBJCPP_COPTS")
1112
load("//mlir:tblgen.bzl", "gentbl_cc_library", "td_library")

utils/bazel/llvm-project-overlay/llvm/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
load("@bazel_skylib//rules:common_settings.bzl", "string_flag")
66
load("@bazel_skylib//rules:expand_template.bzl", "expand_template")
7+
load("@rules_python//python:defs.bzl", "py_binary")
78
load("//mlir:tblgen.bzl", "td_library")
89
load(":binary_alias.bzl", "binary_alias")
910
load(":config.bzl", "llvm_config_defines")

utils/bazel/llvm-project-overlay/llvm/lit_test.bzl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"""Rules for running lit tests."""
55

66
load("@bazel_skylib//lib:paths.bzl", "paths")
7+
load("@rules_python//python:defs.bzl", "py_test")
78

89
def lit_test(
910
name,
@@ -29,8 +30,7 @@ def lit_test(
2930
args = args or []
3031
data = data or []
3132
deps = deps or []
32-
33-
native.py_test(
33+
py_test(
3434
name = name,
3535
srcs = [Label("//llvm:lit")],
3636
main = Label("//llvm:utils/lit/lit.py"),

0 commit comments

Comments
 (0)