//command_line_option

This package provides special targets that correspond to the Bazel-builtin //command_line_option psuedo-targets. These can be used with the config_settings attribute on Python rules to transition specific command line flags for a target.

Note

These targets are not actual alias() targets, Starlark flags, nor are they the actual builtin command line flags. They are regular targets that the config_settings transition logic specially recognizes and handles as if they were the builtin //command_line_option psuedo-targets.

While this package only provides a subset of builtin Bazel flags, additional ones can be introduced by:

  • Define your own @foo//command_line_flag:<name> target. It must be in a top-level command_line_flag directory.

  • Use config.add_transition_setting to make the rules transition on the corresponding //command_line_option:<name> builtin Bazel psuedo-target.

See also

The config_settings attribute documentation on:

enable_runfiles

//command_line_option:enable_runfiles

Special target for the Bazel-builtin //command_line_option:enable_runfiles flag.

See the Bazel documentation for –enable_runfiles.

The special value INHERIT can be specified to use the existing flag value.