diff options
Diffstat (limited to 'mesonbuild/interpreter.py')
-rw-r--r-- | mesonbuild/interpreter.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/mesonbuild/interpreter.py b/mesonbuild/interpreter.py index 214b1eb..48b6bd6 100644 --- a/mesonbuild/interpreter.py +++ b/mesonbuild/interpreter.py @@ -42,7 +42,6 @@ import re import shlex import subprocess import collections -from itertools import chain import functools import typing as T @@ -1112,7 +1111,7 @@ class CompilerHolder(InterpreterObject): args += self.compiler.get_include_args(idir, False) if not nobuiltins: for_machine = Interpreter.machine_from_native_kwarg(kwargs) - opts = self.environment.coredata.compiler_options[for_machine] + opts = self.environment.coredata.compiler_options[for_machine][self.compiler.language] args += self.compiler.get_option_compile_args(opts) if mode == 'link': args += self.compiler.get_option_link_args(opts) @@ -2800,11 +2799,12 @@ external dependencies (including libraries) must go to "dependencies".''') if self.is_subproject(): optname = self.subproject + ':' + optname - for opts in chain( - [self.coredata.base_options, compilers.base_options, self.coredata.builtins], - self.coredata.get_prefixed_options_per_machine(self.coredata.builtins_per_machine), - self.coredata.get_prefixed_options_per_machine(self.coredata.compiler_options), - ): + for opts in [ + self.coredata.base_options, compilers.base_options, self.coredata.builtins, + dict(self.coredata.get_prefixed_options_per_machine(self.coredata.builtins_per_machine)), + dict(self.coredata.flatten_lang_iterator( + self.coredata.get_prefixed_options_per_machine(self.coredata.compiler_options))), + ]: v = opts.get(optname) if v is None or v.yielding: v = opts.get(raw_optname) |