From 7902d2032d45f0f44ffad19362e62b301467c918 Mon Sep 17 00:00:00 2001 From: Xavier Claessens Date: Mon, 3 Aug 2020 10:05:38 -0400 Subject: Refactor handling of machine file options It is much easier to not try to parse options into complicated structures until we actually collected all options: machine files, command line, project()'s default_options, environment. --- mesonbuild/interpreter.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'mesonbuild/interpreter.py') diff --git a/mesonbuild/interpreter.py b/mesonbuild/interpreter.py index cd201d0..0dc38f3 100644 --- a/mesonbuild/interpreter.py +++ b/mesonbuild/interpreter.py @@ -3113,9 +3113,8 @@ external dependencies (including libraries) must go to "dependencies".''') if self.environment.first_invocation: self.coredata.init_backend_options(backend) - if '' in self.environment.meson_options.host: - options = {k: v for k, v in self.environment.meson_options.host[''].items() if k.startswith('backend_')} - self.coredata.set_options(options) + options = {k: v for k, v in self.environment.raw_options.items() if k.startswith('backend_')} + self.coredata.set_options(options) @stringArgs @permittedKwargs(permitted_kwargs['project']) -- cgit v1.1