diff --git a/mesonbuild/ast/introspection.py b/mesonbuild/ast/introspection.py index 0861748052a8..030ca8b18b45 100644 --- a/mesonbuild/ast/introspection.py +++ b/mesonbuild/ast/introspection.py @@ -125,7 +125,7 @@ def func_project(self, node: BaseNode, args: T.List[TYPE_nvar], kwargs: T.Dict[s self.do_subproject(i) self.coredata.init_backend_options(self.backend) - options = {k: v for k, v in self.environment.options.items() if k.name.startswith('backend_')} + options = {k: v for k, v in self.environment.options.items() if k.is_backend()} self.coredata.set_options(options) self._add_languages(proj_langs, MachineChoice.HOST) diff --git a/mesonbuild/coredata.py b/mesonbuild/coredata.py index 263d2fec5383..eae986dae3a7 100644 --- a/mesonbuild/coredata.py +++ b/mesonbuild/coredata.py @@ -89,7 +89,7 @@ class OptionKey: internally easier to reason about and produce. """ - __slots__ = ['name', 'subproject', 'machine', 'lang', '_hash', '_type'] + __slots__ = ['name', 'subproject', 'machine', 'lang', '_hash', 'type'] name: str subproject: str diff --git a/mesonbuild/interpreter.py b/mesonbuild/interpreter.py index a266e1f70382..e6936e4ec6ab 100644 --- a/mesonbuild/interpreter.py +++ b/mesonbuild/interpreter.py @@ -3142,7 +3142,7 @@ def set_backend(self): if self.environment.first_invocation: self.coredata.init_backend_options(backend) - options = {k: v for k, v in self.environment.options.items() if k.name.startswith('backend_')} + options = {k: v for k, v in self.environment.options.items() if k.is_backend()} self.coredata.set_options(options) @stringArgs