File tree Expand file tree Collapse file tree
validate_static_library_env Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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" )
1616load ("//cc:cc_library.bzl" , "cc_library" )
1717load ("//cc:cc_test.bzl" , "cc_test" )
1818
1919licenses (["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).
2424cc_library (
Original file line number Diff line number Diff line change 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 " )
1717load ("@rules_testing//lib:analysis_test.bzl" , "analysis_test" )
1818load ("@rules_testing//lib:util.bzl" , "util" )
1919load ("//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 (
You can’t perform that action at this time.
0 commit comments