Add a helper getter method for common settings

This commit is contained in:
Julie 2020-12-16 13:38:44 -08:00 committed by GitHub
parent ed7f03cde6
commit ab6506c674
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -98,3 +98,7 @@ string_setting = rule(
}, },
doc = "A string-typed build setting that cannot be set on the command line", doc = "A string-typed build setting that cannot be set on the command line",
) )
# Extracts the value from an attribute that returns BuildSettingInfo
def get_build_setting_value(build_setting_attr):
return build_setting_attr[BuildSettingInfo].value