Common build setting rules

These rules return a BuildSettingInfo with the value of the build setting. For label-typed settings, use the native label_flag and label_setting rules.

More documentation on how to use build settings at https://bazel.build/extending/config#user-defined-build-settings

bool_flag

A bool-typed build setting that can be set on the command line

ATTRIBUTES

NameDescriptionTypeMandatoryDefault
nameA unique name for this target.Namerequired

bool_setting

A bool-typed build setting that cannot be set on the command line

ATTRIBUTES

NameDescriptionTypeMandatoryDefault
nameA unique name for this target.Namerequired

int_flag

An int-typed build setting that can be set on the command line

ATTRIBUTES

NameDescriptionTypeMandatoryDefault
nameA unique name for this target.Namerequired

int_setting

An int-typed build setting that cannot be set on the command line

ATTRIBUTES

NameDescriptionTypeMandatoryDefault
nameA unique name for this target.Namerequired

string_flag

A string-typed build setting that can be set on the command line

ATTRIBUTES

NameDescriptionTypeMandatoryDefault
nameA unique name for this target.Namerequired
valuesThe list of allowed values for this setting. An error is raised if any other value is given.List of stringsoptional[]

string_list_flag

A string list-typed build setting that can be set on the command line

ATTRIBUTES

NameDescriptionTypeMandatoryDefault
nameA unique name for this target.Namerequired

string_list_setting

A string list-typed build setting that cannot be set on the command line

ATTRIBUTES

NameDescriptionTypeMandatoryDefault
nameA unique name for this target.Namerequired

string_setting

A string-typed build setting that cannot be set on the command line

ATTRIBUTES

NameDescriptionTypeMandatoryDefault
nameA unique name for this target.Namerequired
valuesThe list of allowed values for this setting. An error is raised if any other value is given.List of stringsoptional[]

BuildSettingInfo

A singleton provider that contains the raw value of a build setting

FIELDS

NameDescription
valueThe value of the build setting in the current configuration. This value may come from the command line or an upstream transition, or else it will be the build setting's default.