Skip to content

Commit aa735fb

Browse files
bonzinijpakkane
authored andcommitted
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: mesonbuild#14558 Signed-off-by: Paolo Bonzini <[email protected]>
1 parent 852a580 commit aa735fb

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

mesonbuild/options.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -910,16 +910,16 @@ def add_system_option_internal(self, key: OptionKey, valobj: AnyOptionType) -> N
910910
if key in self.options:
911911
return
912912

913-
self.options[key] = valobj
914913
pval = self.pending_options.pop(key, None)
915914
if key.subproject:
916915
proj_key = key.evolve(subproject=None)
917916
self.add_system_option_internal(proj_key, valobj)
918-
if pval is None:
919-
pval = self.options[proj_key].value
920-
921-
if pval is not None:
922-
self.set_option(key, pval)
917+
if pval is not None:
918+
self.augments[key] = pval
919+
else:
920+
self.options[key] = valobj
921+
if pval is not None:
922+
self.set_option(key, pval)
923923

924924
def add_compiler_option(self, language: str, key: T.Union[OptionKey, str], valobj: AnyOptionType) -> None:
925925
key = self.ensure_and_validate_key(key)

0 commit comments

Comments
 (0)