diff options
| author | Paolo Bonzini <pbonzini@redhat.com> | 2025-06-18 13:27:56 +0200 |
|---|---|---|
| committer | Jussi Pakkanen <jussi.pakkanen@mailbox.org> | 2025-06-20 15:02:06 +0300 |
| commit | aa735fb7342c864b5e315c7e22d0d57a6a4337fa (patch) | |
| tree | 8061d9936e6ff5cf6a45ab277f4bf59b998d1868 | |
| parent | 852a580ee6ed32bd21303e977556008de7918651 (diff) | |
| download | meson-aa735fb7342c864b5e315c7e22d0d57a6a4337fa.tar.gz | |
options: do not store duplicate UserOptions
These options are never looked up except by "meson configure" and
introspection, because option values are taken from self.augments[]
instead.
Fixes: #14558
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| -rw-r--r-- | mesonbuild/options.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/mesonbuild/options.py b/mesonbuild/options.py index 4f51c38b7..bc4d79f35 100644 --- a/mesonbuild/options.py +++ b/mesonbuild/options.py @@ -910,16 +910,16 @@ class OptionStore: if key in self.options: return - self.options[key] = valobj pval = self.pending_options.pop(key, None) if key.subproject: proj_key = key.evolve(subproject=None) self.add_system_option_internal(proj_key, valobj) - if pval is None: - pval = self.options[proj_key].value - - if pval is not None: - self.set_option(key, pval) + if pval is not None: + self.augments[key] = pval + else: + self.options[key] = valobj + if pval is not None: + self.set_option(key, pval) def add_compiler_option(self, language: str, key: T.Union[OptionKey, str], valobj: AnyOptionType) -> None: key = self.ensure_and_validate_key(key) |
