Skip to content

Commit

Permalink
backend/ninja: allow cleandead with dyndeps and ninja >= 1.12
Browse files Browse the repository at this point in the history
I fixed the upstream issue here, so if we have >= 1.12 we don't need to
worry about the dyndeps issue.

See: ninja-build/ninja#2406
  • Loading branch information
dcbaker authored and jpakkane committed Oct 2, 2024
1 parent 21b1054 commit 54cb8ce
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion mesonbuild/backend/ninjabackend.py
Original file line number Diff line number Diff line change
Expand Up @@ -692,7 +692,9 @@ def generate(self, capture: bool = False, vslite_ctx: T.Optional[T.Dict] = None)
mlog.cmd_ci_include(outfilename) # For CI debugging
# Refresh Ninja's caches. https://github.com/ninja-build/ninja/pull/1685
# Cannot use when running with dyndeps: https://github.com/ninja-build/ninja/issues/1952
if mesonlib.version_compare(self.ninja_version, '>=1.10.0') and os.path.exists(os.path.join(self.environment.build_dir, '.ninja_log')) and not self._uses_dyndeps:
if ((mesonlib.version_compare(self.ninja_version, '>= 1.12.0') or
(mesonlib.version_compare(self.ninja_version, '>=1.10.0') and not self._uses_dyndeps))
and os.path.exists(os.path.join(self.environment.build_dir, '.ninja_log'))):
subprocess.call(self.ninja_command + ['-t', 'restat'], cwd=self.environment.build_dir)
subprocess.call(self.ninja_command + ['-t', 'cleandead'], cwd=self.environment.build_dir)
self.generate_compdb()
Expand Down

0 comments on commit 54cb8ce

Please sign in to comment.