From 2f6fc30df10583c77dc1318f2fb62111de3e121c Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Fri, 9 May 2025 11:54:09 +0200 Subject: msetup: update coredata if options are passed together with --reconfigure This makes "meson setup --reconfigure" behave quite literally the same as "meson configure" + "meson setup"; except that saving coredata and cmdline file is delayed until the setup succeeds. Fixes: #14575 Signed-off-by: Paolo Bonzini --- mesonbuild/msetup.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mesonbuild/msetup.py b/mesonbuild/msetup.py index 81dd18330..c8770fd93 100644 --- a/mesonbuild/msetup.py +++ b/mesonbuild/msetup.py @@ -180,6 +180,9 @@ class MesonApp: # See class Backend's 'generate' for comments on capture args and returned dictionary. def generate(self, capture: bool = False, vslite_ctx: T.Optional[dict] = None) -> T.Optional[dict]: env = environment.Environment(self.source_dir, self.build_dir, self.options) + if not env.first_invocation: + assert self.options.reconfigure + env.coredata.set_from_configure_command(self.options) mlog.initialize(env.get_log_dir(), self.options.fatal_warnings) if self.options.profile: mlog.set_timestamp_start(time.monotonic()) -- cgit v1.2.3