summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2024-09-30 11:14:30 -0700
committerJussi Pakkanen <jpakkane@gmail.com>2024-10-02 16:11:08 +0300
commit54cb8cec8c27fd2cf3faf70cff2e517a3de37790 (patch)
tree7acf136219fc798d90dc372ea19aa0d1e11a766d
parent21b105473079fe3722c1268b507dd91dde95abba (diff)
downloadmeson-54cb8cec8c27fd2cf3faf70cff2e517a3de37790.tar.gz
backend/ninja: allow cleandead with dyndeps and ninja >= 1.12
I fixed the upstream issue here, so if we have >= 1.12 we don't need to worry about the dyndeps issue. See: https://github.com/ninja-build/ninja/pull/2406/
-rw-r--r--mesonbuild/backend/ninjabackend.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py
index 6eb1f1d01..675248962 100644
--- a/mesonbuild/backend/ninjabackend.py
+++ b/mesonbuild/backend/ninjabackend.py
@@ -692,7 +692,9 @@ class NinjaBackend(backends.Backend):
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()