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/scripts/regen_checker.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'mesonbuild/scripts') diff --git a/mesonbuild/scripts/regen_checker.py b/mesonbuild/scripts/regen_checker.py index fa98f59..1187783 100644 --- a/mesonbuild/scripts/regen_checker.py +++ b/mesonbuild/scripts/regen_checker.py @@ -17,6 +17,7 @@ import pickle, subprocess import typing as T from ..coredata import CoreData from ..backend.vs2010backend import RegenInfo +from ..mesonlib import OptionKey # This could also be used for XCode. @@ -52,7 +53,7 @@ def run(args: T.List[str]) -> int: with open(coredata_file, 'rb') as f: coredata = pickle.load(f) assert isinstance(coredata, CoreData) - backend = coredata.get_builtin_option('backend') + backend = coredata.get_option(OptionKey('backend')) assert isinstance(backend, str) regen_timestamp = os.stat(dumpfile).st_mtime if need_regen(regeninfo, regen_timestamp): -- cgit v1.1