Hi, One thing that's pretty cool with ninja based builds is that it contains a dependency log of "discovered" dependencies as well as information about dependencies "encoded" in the build specification. LLVM contains a script that uses that dependency information to see whether the build specification is missing any dependencies - this helped me find several "build bugs".
The script is at: https://github.com/llvm/llvm-project/blob/main/llvm/utils/check_ninja_deps.py It just needs to be invoked in the build directory after a build. If I e.g. remove the dependency from libpgcommon_srv.a to the lwlocknames.h generation (*) it complains with: error: src/common/libpgcommon_srv.a.p/cryptohash_openssl.c.o requires src/include/storage/lwlocknames.h but has no dependency on it error: src/common/libpgcommon_srv.a.p/hmac_openssl.c.o requires src/include/storage/lwlocknames.h but has no dependency on it I wonder if it's worth having a build target invoking it? But how to get the path to the script? We could just copy it into src/tools? It's permissively licensed... Greetings, Andres Freund (*) It seems architecturally pretty darn ugly for pgcommon to acquire lwlocks.