From e81acbd6069e8c1ae8e3be7bb83ddc239009d42d Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Fri, 4 Dec 2020 17:01:45 -0800 Subject: Use a single coredata dictionary for options This patches takes the options work to it's logical conclusion: A single flat dictionary of OptionKey: UserOptions. This allows us to simplify a large number of cases, as we don't need to check if an option is in this dict or that one (or any of 5 or 6, actually). --- mesonbuild/dependencies/boost.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'mesonbuild/dependencies/boost.py') diff --git a/mesonbuild/dependencies/boost.py b/mesonbuild/dependencies/boost.py index e2e4789..622ee37 100644 --- a/mesonbuild/dependencies/boost.py +++ b/mesonbuild/dependencies/boost.py @@ -341,7 +341,7 @@ class BoostLibraryFile(): class BoostDependency(ExternalDependency): def __init__(self, environment: Environment, kwargs: T.Dict[str, T.Any]) -> None: super().__init__('boost', environment, kwargs, language='cpp') - buildtype = environment.coredata.get_builtin_option('buildtype') + buildtype = environment.coredata.get_option(mesonlib.OptionKey('buildtype')) assert isinstance(buildtype, str) self.debug = buildtype.startswith('debug') self.multithreading = kwargs.get('threading', 'multi') == 'multi' @@ -616,8 +616,8 @@ class BoostDependency(ExternalDependency): # MSVC is very picky with the library tags vscrt = '' try: - crt_val = self.env.coredata.base_options[mesonlib.OptionKey('b_vscrt')].value - buildtype = self.env.coredata.builtins[mesonlib.OptionKey('buildtype')].value + crt_val = self.env.coredata.options[mesonlib.OptionKey('b_vscrt')].value + buildtype = self.env.coredata.options[mesonlib.OptionKey('buildtype')].value vscrt = self.clib_compiler.get_crt_compile_args(crt_val, buildtype)[0] except (KeyError, IndexError, AttributeError): pass -- cgit v1.1