common_settings
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
Rules
bool_flag
A bool-typed build setting that can be set on the command line
Example usage (generated):
load("@bazel_skylib//rules:common_settings.bzl", "bool_flag")
bool_flag(
# A unique name for this target.
name = "",
)
name
Required name.
A unique name for this target.
bool_setting
A bool-typed build setting that cannot be set on the command line
Example usage (generated):
load("@bazel_skylib//rules:common_settings.bzl", "bool_setting")
bool_setting(
# A unique name for this target.
name = "",
)
name
Required name.
A unique name for this target.
int_flag
An int-typed build setting that can be set on the command line
Example usage (generated):
load("@bazel_skylib//rules:common_settings.bzl", "int_flag")
int_flag(
# A unique name for this target.
name = "",
)
name
Required name.
A unique name for this target.
make_variable
Optional string.
Default: ""
If set, the build setting's value will be available as a Make variable with this name in the attributes of rules that list this build setting in their 'toolchains' attribute.
int_setting
An int-typed build setting that cannot be set on the command line
Example usage (generated):
load("@bazel_skylib//rules:common_settings.bzl", "int_setting")
int_setting(
# A unique name for this target.
name = "",
)
name
Required name.
A unique name for this target.
make_variable
Optional string.
Default: ""
If set, the build setting's value will be available as a Make variable with this name in the attributes of rules that list this build setting in their 'toolchains' attribute.
string_flag
A string-typed build setting that can be set on the command line
Example usage (generated):
load("@bazel_skylib//rules:common_settings.bzl", "string_flag")
string_flag(
# A unique name for this target.
name = "",
)
name
Required name.
A unique name for this target.
make_variable
Optional string.
Default: ""
If set, the build setting's value will be available as a Make variable with this name in the attributes of rules that list this build setting in their 'toolchains' attribute.
values
Optional list of strings.
Default: []
The list of allowed values for this setting. An error is raised if any other value is given.
string_list_flag
A string list-typed build setting that can be set on the command line
Example usage (generated):
load("@bazel_skylib//rules:common_settings.bzl", "string_list_flag")
string_list_flag(
# A unique name for this target.
name = "",
)
name
Required name.
A unique name for this target.
string_list_setting
A string list-typed build setting that cannot be set on the command line
Example usage (generated):
load("@bazel_skylib//rules:common_settings.bzl", "string_list_setting")
string_list_setting(
# A unique name for this target.
name = "",
)
name
Required name.
A unique name for this target.
string_setting
A string-typed build setting that cannot be set on the command line
Example usage (generated):
load("@bazel_skylib//rules:common_settings.bzl", "string_setting")
string_setting(
# A unique name for this target.
name = "",
)
name
Required name.
A unique name for this target.
make_variable
Optional string.
Default: ""
If set, the build setting's value will be available as a Make variable with this name in the attributes of rules that list this build setting in their 'toolchains' attribute.
values
Optional list of strings.
Default: []
The list of allowed values for this setting. An error is raised if any other value is given.
Providers
BuildSettingInfo
A singleton provider that contains the raw value of a build setting