1<!-- Generated with Stardoc: http://skydoc.bazel.build --> 2 3Common build setting rules 4 5These rules return a BuildSettingInfo with the value of the build setting. 6For label-typed settings, use the native label_flag and label_setting rules. 7 8More documentation on how to use build settings at 9https://docs.bazel.build/versions/main/skylark/config.html#user-defined-build-settings 10 11 12<a id="#bool_flag"></a> 13 14## bool_flag 15 16<pre> 17bool_flag(<a href="#bool_flag-name">name</a>) 18</pre> 19 20A bool-typed build setting that can be set on the command line 21 22**ATTRIBUTES** 23 24 25| Name | Description | Type | Mandatory | Default | 26| :------------- | :------------- | :------------- | :------------- | :------------- | 27| <a id="bool_flag-name"></a>name | A unique name for this target. | <a href="https://bazel.build/docs/build-ref.html#name">Name</a> | required | | 28 29 30<a id="#bool_setting"></a> 31 32## bool_setting 33 34<pre> 35bool_setting(<a href="#bool_setting-name">name</a>) 36</pre> 37 38A bool-typed build setting that cannot be set on the command line 39 40**ATTRIBUTES** 41 42 43| Name | Description | Type | Mandatory | Default | 44| :------------- | :------------- | :------------- | :------------- | :------------- | 45| <a id="bool_setting-name"></a>name | A unique name for this target. | <a href="https://bazel.build/docs/build-ref.html#name">Name</a> | required | | 46 47 48<a id="#int_flag"></a> 49 50## int_flag 51 52<pre> 53int_flag(<a href="#int_flag-name">name</a>) 54</pre> 55 56An int-typed build setting that can be set on the command line 57 58**ATTRIBUTES** 59 60 61| Name | Description | Type | Mandatory | Default | 62| :------------- | :------------- | :------------- | :------------- | :------------- | 63| <a id="int_flag-name"></a>name | A unique name for this target. | <a href="https://bazel.build/docs/build-ref.html#name">Name</a> | required | | 64 65 66<a id="#int_setting"></a> 67 68## int_setting 69 70<pre> 71int_setting(<a href="#int_setting-name">name</a>) 72</pre> 73 74An int-typed build setting that cannot be set on the command line 75 76**ATTRIBUTES** 77 78 79| Name | Description | Type | Mandatory | Default | 80| :------------- | :------------- | :------------- | :------------- | :------------- | 81| <a id="int_setting-name"></a>name | A unique name for this target. | <a href="https://bazel.build/docs/build-ref.html#name">Name</a> | required | | 82 83 84<a id="#string_flag"></a> 85 86## string_flag 87 88<pre> 89string_flag(<a href="#string_flag-name">name</a>, <a href="#string_flag-values">values</a>) 90</pre> 91 92A string-typed build setting that can be set on the command line 93 94**ATTRIBUTES** 95 96 97| Name | Description | Type | Mandatory | Default | 98| :------------- | :------------- | :------------- | :------------- | :------------- | 99| <a id="string_flag-name"></a>name | A unique name for this target. | <a href="https://bazel.build/docs/build-ref.html#name">Name</a> | required | | 100| <a id="string_flag-values"></a>values | The list of allowed values for this setting. An error is raised if any other value is given. | List of strings | optional | [] | 101 102 103<a id="#string_list_flag"></a> 104 105## string_list_flag 106 107<pre> 108string_list_flag(<a href="#string_list_flag-name">name</a>) 109</pre> 110 111A string list-typed build setting that can be set on the command line 112 113**ATTRIBUTES** 114 115 116| Name | Description | Type | Mandatory | Default | 117| :------------- | :------------- | :------------- | :------------- | :------------- | 118| <a id="string_list_flag-name"></a>name | A unique name for this target. | <a href="https://bazel.build/docs/build-ref.html#name">Name</a> | required | | 119 120 121<a id="#string_list_setting"></a> 122 123## string_list_setting 124 125<pre> 126string_list_setting(<a href="#string_list_setting-name">name</a>) 127</pre> 128 129A string list-typed build setting that cannot be set on the command line 130 131**ATTRIBUTES** 132 133 134| Name | Description | Type | Mandatory | Default | 135| :------------- | :------------- | :------------- | :------------- | :------------- | 136| <a id="string_list_setting-name"></a>name | A unique name for this target. | <a href="https://bazel.build/docs/build-ref.html#name">Name</a> | required | | 137 138 139<a id="#string_setting"></a> 140 141## string_setting 142 143<pre> 144string_setting(<a href="#string_setting-name">name</a>, <a href="#string_setting-values">values</a>) 145</pre> 146 147A string-typed build setting that cannot be set on the command line 148 149**ATTRIBUTES** 150 151 152| Name | Description | Type | Mandatory | Default | 153| :------------- | :------------- | :------------- | :------------- | :------------- | 154| <a id="string_setting-name"></a>name | A unique name for this target. | <a href="https://bazel.build/docs/build-ref.html#name">Name</a> | required | | 155| <a id="string_setting-values"></a>values | The list of allowed values for this setting. An error is raised if any other value is given. | List of strings | optional | [] | 156 157 158<a id="#BuildSettingInfo"></a> 159 160## BuildSettingInfo 161 162<pre> 163BuildSettingInfo(<a href="#BuildSettingInfo-value">value</a>) 164</pre> 165 166A singleton provider that contains the raw value of a build setting 167 168**FIELDS** 169 170 171| Name | Description | 172| :------------- | :------------- | 173| <a id="BuildSettingInfo-value"></a>value | The 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. | 174 175 176