From 140780b1e9d4eb7892dcc0e7ce1b4aa29d29972d Mon Sep 17 00:00:00 2001 From: Jussi Pakkanen Date: Sun, 15 Aug 2021 03:05:17 +0300 Subject: Refresh Ninja cache files on regeneration. --- mesonbuild/backend/ninjabackend.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py index 44ff147..05b3034 100644 --- a/mesonbuild/backend/ninjabackend.py +++ b/mesonbuild/backend/ninjabackend.py @@ -567,6 +567,9 @@ class NinjaBackend(backends.Backend): # fully created. os.replace(tempfilename, outfilename) mlog.cmd_ci_include(outfilename) # For CI debugging + # Refresh Ninja's caches. https://github.com/ninja-build/ninja/pull/1685 + if os.path.exists('.ninja_deps'): + subprocess.call(self.ninja_command + ['-t', 'restat']) self.generate_compdb() # http://clang.llvm.org/docs/JSONCompilationDatabase.html -- cgit v1.1