diff options
| -rw-r--r-- | docs/yaml/functions/get_option.yaml | 5 | ||||
| -rw-r--r-- | mesonbuild/interpreter/interpreter.py | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/docs/yaml/functions/get_option.yaml b/docs/yaml/functions/get_option.yaml index 0934758bc..b8b1fc4cd 100644 --- a/docs/yaml/functions/get_option.yaml +++ b/docs/yaml/functions/get_option.yaml @@ -20,6 +20,11 @@ description: | See [`feature` options](Build-options.md#features) documentation for more details. + For options that are [specified + per-machine](Builtin-options.md#specifying-options-per-machine) + `get_option()` retrieves the value of the option for the + build machine if the argument starts with `build.`. + posargs: option_name: type: str diff --git a/mesonbuild/interpreter/interpreter.py b/mesonbuild/interpreter/interpreter.py index 730f3d36e..8f68646d3 100644 --- a/mesonbuild/interpreter/interpreter.py +++ b/mesonbuild/interpreter/interpreter.py @@ -1085,7 +1085,7 @@ class Interpreter(InterpreterBase, HoldableObject): value_object: T.Optional[options.AnyOptionType] try: - optkey = options.OptionKey(optname, self.subproject) + optkey = options.OptionKey.from_string(optname).evolve(subproject=self.subproject) value_object, value = self.coredata.optstore.get_value_object_and_value_for(optkey) except KeyError: if self.coredata.optstore.is_base_option(optkey): |
