diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2020-11-30 12:10:40 -0800 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2021-01-04 12:15:41 -0800 |
commit | b25a423a645491e83112929f95c1bd9312458a9a (patch) | |
tree | 6f37b0f1e3bdc68d9d0d6e3c0208d4ee2735d75f /mesonbuild/ast | |
parent | 983380d5ce9a33f2528202cc3d112c4109bf2c84 (diff) | |
download | meson-b25a423a645491e83112929f95c1bd9312458a9a.zip meson-b25a423a645491e83112929f95c1bd9312458a9a.tar.gz meson-b25a423a645491e83112929f95c1bd9312458a9a.tar.bz2 |
use the OptionKey type for command line and machine files
Diffstat (limited to 'mesonbuild/ast')
-rw-r--r-- | mesonbuild/ast/introspection.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mesonbuild/ast/introspection.py b/mesonbuild/ast/introspection.py index eca869f..0861748 100644 --- a/mesonbuild/ast/introspection.py +++ b/mesonbuild/ast/introspection.py @@ -65,7 +65,7 @@ class IntrospectionInterpreter(AstInterpreter): self.coredata = self.environment.get_coredata() self.option_file = os.path.join(self.source_root, self.subdir, 'meson_options.txt') self.backend = backend - self.default_options = {'backend': self.backend} + self.default_options = {cdata.OptionKey('backend'): self.backend} self.project_data = {} # type: T.Dict[str, T.Any] self.targets = [] # type: T.List[T.Dict[str, T.Any]] self.dependencies = [] # type: T.List[T.Dict[str, T.Any]] @@ -107,7 +107,7 @@ class IntrospectionInterpreter(AstInterpreter): def_opts = self.flatten_args(kwargs.get('default_options', [])) _project_default_options = mesonlib.stringlistify(def_opts) - self.project_default_options = cdata.create_options_dict(_project_default_options) + self.project_default_options = cdata.create_options_dict(_project_default_options, self.subproject) self.default_options.update(self.project_default_options) self.coredata.set_default_options(self.default_options, self.subproject, self.environment) @@ -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.raw_options.items() if k.startswith('backend_')} + options = {k: v for k, v in self.environment.options.items() if k.name.startswith('backend_')} self.coredata.set_options(options) self._add_languages(proj_langs, MachineChoice.HOST) |