Clone this repo:
  1. 6dd3f71 Update actions and test on 10.* (#167) by Fabian Meumertzheim · 21 hours ago upstream/main
  2. 8acc9d7 Add placeholder features for toolchain type migrations (#165) by Fabian Meumertzheim · 5 days ago v1.55.0
  3. 6f5b91e Add ge("10.0.0-pre.20261001.2") to cc._map_directory_supports_cc_compile (#163) by Philip Zembrod · 13 days ago v1.54.1
  4. 15981a7 Add feature for label build setting scope (#162) by Finn Ball · 13 days ago v1.54.0
  5. 3e2ab7e Add feature cc.map_directory_supports_cc_compile (#159) by Philip Zembrod · 3 weeks ago v1.53.0

Bazel Features

Use this to determine the availability of a Bazel feature in your ruleset. It works under the hood by comparing the Bazel version against a known range in which the feature is available. Example usage:

load("@bazel_features//:features.bzl", "bazel_features")
if bazel_features.toolchains.has_optional_toolchains:
    # Do something

The features.bzl file contains the list of features.

Accessing globals

References to global Starlark symbols that do not exist cause load time errors, which means that their availability in Bazel cannot be tested via a regular feature. Instead, use bazel_features.globals.<symbol>, which is <symbol> if the symbol is available and None else.

See globals.bzl for the list of symbols that can be checked for in this way.