use new optionkey.is_* methods

pull/8080/head
Dylan Baker 4 years ago
parent 30ec7612c8
commit 615686fd6d
  1. 2
      mesonbuild/ast/introspection.py
  2. 2
      mesonbuild/coredata.py
  3. 2
      mesonbuild/interpreter.py

@ -125,7 +125,7 @@ class IntrospectionInterpreter(AstInterpreter):
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)

@ -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

@ -3142,7 +3142,7 @@ external dependencies (including libraries) must go to "dependencies".''')
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

Loading…
Cancel
Save