diff --git a/docs/common_settings_doc.md b/docs/common_settings_doc.md index 83be443..b5fdd0b 100755 --- a/docs/common_settings_doc.md +++ b/docs/common_settings_doc.md @@ -150,7 +150,7 @@ A string list-typed build setting that cannot be set on the command line ## string_setting
-string_setting(name, make_variable, values)
+string_setting(name, make_variable, scope, values)
 
A string-typed build setting that cannot be set on the command line @@ -162,6 +162,7 @@ A string-typed build setting that cannot be set on the command line | :------------- | :------------- | :------------- | :------------- | :------------- | | name | A unique name for this target. | Name | required | | | make_variable | 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 | optional | `""` | +| scope | The scope indicates where a flag can propagate to | String | optional | `"universal"` | | values | The list of allowed values for this setting. An error is raised if any other value is given. | List of strings | optional | `[]` | diff --git a/rules/common_settings.bzl b/rules/common_settings.bzl index 5776d8d..aba40c2 100644 --- a/rules/common_settings.bzl +++ b/rules/common_settings.bzl @@ -176,6 +176,10 @@ string_setting = rule( doc = "The list of allowed values for this setting. An error is raised if any other value is given.", ), "make_variable": _MAKE_VARIABLE_ATTR, + "scope": attr.string( + doc = "The scope indicates where a flag can propagate to", + default = "universal", + ), }, doc = "A string-typed build setting that cannot be set on the command line", )