From 8e8abba8f59a9bc4f0d4cb35ceddee5b4a8f04cb Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Sat, 5 Jul 2025 17:23:00 +0200 Subject: msetup: keep pending options New languages and subprojects can appear in subsequent configurations. Subproject options are kept for later now that they are not stored in pending_options, but compiler options for example are not. Drop OptionStore.clear_pending so that they are preserved as well. Signed-off-by: Paolo Bonzini --- mesonbuild/msetup.py | 2 -- mesonbuild/options.py | 3 --- 2 files changed, 5 deletions(-) diff --git a/mesonbuild/msetup.py b/mesonbuild/msetup.py index 9f30a8e92..e22e0a7bb 100644 --- a/mesonbuild/msetup.py +++ b/mesonbuild/msetup.py @@ -213,8 +213,6 @@ class MesonApp: errstr = ', '.join(errlist) raise MesonException(f'Unknown options: {errstr}') - coredata.optstore.clear_pending() - def _generate(self, env: environment.Environment, capture: bool, vslite_ctx: T.Optional[dict]) -> T.Optional[dict]: # Get all user defined options, including options that have been defined # during a previous invocation or using meson configure. diff --git a/mesonbuild/options.py b/mesonbuild/options.py index 38bfdf034..b9b00eff5 100644 --- a/mesonbuild/options.py +++ b/mesonbuild/options.py @@ -819,9 +819,6 @@ class OptionStore: # Subproject options from toplevel project() self.pending_subproject_options: OptionDict = {} - def clear_pending(self) -> None: - self.pending_options = {} - def ensure_and_validate_key(self, key: T.Union[OptionKey, str]) -> OptionKey: if isinstance(key, str): return OptionKey(key) -- cgit v1.2.3