aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/mconf.py
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2020-12-02 16:02:03 -0800
committerDylan Baker <dylan@pnwbakers.com>2021-01-04 12:20:39 -0800
commitfe973d9fc45581f20fefc41fc0b8eb0066c0129d (patch)
treecbf7f5bd779ddae1655c9644ef96c4df66e67ee3 /mesonbuild/mconf.py
parentbdca05e2e66abbd872c17b8226641a2b8d018112 (diff)
downloadmeson-fe973d9fc45581f20fefc41fc0b8eb0066c0129d.zip
meson-fe973d9fc45581f20fefc41fc0b8eb0066c0129d.tar.gz
meson-fe973d9fc45581f20fefc41fc0b8eb0066c0129d.tar.bz2
use OptionKey for compiler_options
Diffstat (limited to 'mesonbuild/mconf.py')
-rw-r--r--mesonbuild/mconf.py11
1 files changed, 4 insertions, 7 deletions
diff --git a/mesonbuild/mconf.py b/mesonbuild/mconf.py
index 20e6d26..c14d701 100644
--- a/mesonbuild/mconf.py
+++ b/mesonbuild/mconf.py
@@ -17,6 +17,8 @@ from . import coredata, environment, mesonlib, build, mintro, mlog
from .ast import AstIDGenerator
import typing as T
+from .mesonlib import MachineChoice
+
if T.TYPE_CHECKING:
import argparse
from .coredata import OptionKey, UserOption
@@ -217,13 +219,8 @@ class Conf:
core_options = {k: o for k, o in self.coredata.builtins.items() if k in core_option_names}
core_options = self.split_options_per_subproject(core_options)
- host_compiler_options = self.split_options_per_subproject(
- dict(self.coredata.flatten_lang_iterator(
- self.coredata.compiler_options.host.items())))
- build_compiler_options = self.split_options_per_subproject(
- dict(self.coredata.flatten_lang_iterator(
- (insert_build_prefix(k), o)
- for k, o in self.coredata.compiler_options.build.items())))
+ host_compiler_options = self.split_options_per_subproject2({k: v for k, v in self.coredata.compiler_options.items() if k.machine is MachineChoice.HOST})
+ build_compiler_options = self.split_options_per_subproject2({k: v for k, v in self.coredata.compiler_options.items() if k.machine is MachineChoice.BUILD})
project_options = self.split_options_per_subproject2(self.coredata.user_options)
show_build_options = self.default_values_only or self.build.environment.is_cross_build()