aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/mintro.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/mintro.py
parentbdca05e2e66abbd872c17b8226641a2b8d018112 (diff)
downloadmeson-fe973d9fc45581f20fefc41fc0b8eb0066c0129d.zip
meson-fe973d9fc45581f20fefc41fc0b8eb0066c0129d.tar.gz
meson-fe973d9fc45581f20fefc41fc0b8eb0066c0129d.tar.bz2
use OptionKey for compiler_options
Diffstat (limited to 'mesonbuild/mintro.py')
-rw-r--r--mesonbuild/mintro.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/mesonbuild/mintro.py b/mesonbuild/mintro.py
index e252e82..7b2560f 100644
--- a/mesonbuild/mintro.py
+++ b/mesonbuild/mintro.py
@@ -33,6 +33,8 @@ import typing as T
import os
import argparse
+from .mesonlib import MachineChoice
+
def get_meson_info_file(info_dir: str) -> str:
return os.path.join(info_dir, 'meson-info.json')
@@ -260,13 +262,12 @@ def list_buildoptions(coredata: cdata.CoreData, subprojects: T.Optional[T.List[s
add_keys({str(k): v for k, v in coredata.backend_options.items()}, 'backend')
add_keys(coredata.base_options, 'base')
add_keys(
- dict(coredata.flatten_lang_iterator(coredata.compiler_options.host.items())),
+ {str(k): v for k, v in coredata.compiler_options.items() if k.machine is MachineChoice.HOST},
'compiler',
machine='host',
)
- tmp_dict = dict(coredata.flatten_lang_iterator(coredata.compiler_options.build.items())) # type: T.Dict[str, cdata.UserOption]
add_keys(
- {'build.' + k: o for k, o in tmp_dict.items()},
+ {str(k): v for k, v in coredata.compiler_options.items() if k.machine is MachineChoice.BUILD},
'compiler',
machine='build',
)