diff options
| author | Paolo Bonzini <pbonzini@redhat.com> | 2025-05-19 11:08:07 +0200 |
|---|---|---|
| committer | Eli Schwartz <eschwartz93@gmail.com> | 2025-05-21 21:41:40 -0400 |
| commit | 8dcc9d3423762f9cf996af87b8a2c71c7111aa32 (patch) | |
| tree | 31ed363961cf505566dbd5533a80f0c639d2b612 /mesonbuild/options.py | |
| parent | cc382b237ac88b14210e0292940394385cab31f6 (diff) | |
| download | meson-8dcc9d3423762f9cf996af87b8a2c71c7111aa32.tar.gz | |
options: accept compiler and built-in options in --reconfigure and "meson configure"
Follow the same logic that is used at the end of the first invocation.
This fixes
meson setup --reconfigure -Db_ndebug=true
on a project that has no language that defines b_ndebug.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'mesonbuild/options.py')
| -rw-r--r-- | mesonbuild/options.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/mesonbuild/options.py b/mesonbuild/options.py index 682d942bf..2689d6410 100644 --- a/mesonbuild/options.py +++ b/mesonbuild/options.py @@ -1059,8 +1059,13 @@ class OptionStore: def set_option_maybe_root(self, o: OptionKey, new_value: str) -> bool: if o in self.options: return self.set_option(o, new_value) - o = o.as_root() - return self.set_option(o, new_value) + if self.accept_as_pending_option(o): + old_value = self.pending_options.get(o, None) + self.pending_options[o] = new_value + return old_value is None or str(old_value) == new_value + else: + o = o.as_root() + return self.set_option(o, new_value) def set_from_configure_command(self, D_args: T.List[str], U_args: T.List[str]) -> bool: dirty = False |
