Skip to content

Commit 46541c1

Browse files
committed
Fix bazel_features test issue
On-import this change was changed and broke public CI
1 parent cab7071 commit 46541c1

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

tests/alwayslink_srcs/BUILD

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
load("@bazel_features//private:util.bzl", _bazel_version_ge = "ge") # buildifier: disable=bzl-visibility
15+
load("@bazel_features//:features.bzl", "bazel_features")
1616
load("//cc:cc_library.bzl", "cc_library")
1717
load("//cc:cc_test.bzl", "cc_test")
1818

1919
licenses(["notice"])
2020

21-
VERSION_GATE = [] if _bazel_version_ge("9.0.0-pre.20250911") else ["@platforms//:incompatible"]
21+
VERSION_GATE = [] if bazel_features.cc.cc_common_is_in_rules_cc else ["@platforms//:incompatible"]
2222

2323
# Library that provides the registration state (was_registered/set_registered).
2424
cc_library(

tests/validate_static_library_env/validate_static_library_env_test.bzl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# limitations under the License.
1414
"""Analysis test for validate_static_library environment propagation."""
1515

16-
load("@bazel_features//private:util.bzl", _bazel_version_ge = "ge")
16+
load("@bazel_features//:features.bzl", "bazel_features")
1717
load("@rules_testing//lib:analysis_test.bzl", "analysis_test")
1818
load("@rules_testing//lib:util.bzl", "util")
1919
load("//cc:cc_static_library.bzl", "cc_static_library")
@@ -42,7 +42,7 @@ def maybe_define_validate_static_library_env_targets():
4242
# cc_static_library is implemented in rules_cc only for Bazel 9+.
4343
# For older Bazel versions, the native rule is used and does not wire
4444
# env vars from rules_cc toolchains for ValidateStaticLibrary.
45-
if not _bazel_version_ge("9.0.0-pre.20250911"):
45+
if not bazel_features.cc.cc_common_is_in_rules_cc:
4646
return
4747

4848
util.helper_target(

0 commit comments

Comments
 (0)