From 278c294aa45efc3e8b068bcd7632828ed5c92523 Mon Sep 17 00:00:00 2001 From: John Ericson Date: Wed, 12 Jun 2019 18:08:45 -0400 Subject: Compiler options per lang A current rather untyped storage of options is one of the things that contributes to the options code being so complex. This takes a small step in synching down by storing the compiler options in dicts per language. Future work might be replacing the langauge strings with an enum, and defaultdict with a custom struct, just like `PerMachine` and `MachineChoice`. --- mesonbuild/rewriter.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mesonbuild/rewriter.py') diff --git a/mesonbuild/rewriter.py b/mesonbuild/rewriter.py index 785451f..7730ab6 100644 --- a/mesonbuild/rewriter.py +++ b/mesonbuild/rewriter.py @@ -469,8 +469,8 @@ class Rewriter: **{'build.' + k: o for k, o in cdata.builtins_per_machine.build.items()}, **cdata.backend_options, **cdata.base_options, - **cdata.compiler_options.host, - **{'build.' + k: o for k, o in cdata.compiler_options.build.items()}, + **(dict(cdata.flatten_lang_iterator(cdata.compiler_options.host.items()))), + **{'build.' + k: o for k, o in cdata.flatten_lang_iterator(cdata.compiler_options.build.items())}, **cdata.user_options, } -- cgit v1.1