LGBI but a question, if clangd needs a meson build to get the compile_commands.json why doesn't it use the build/.cache/clangd directory?
No idea but my guess is to preserve the cached files also when you wipe the build directory - e.g. you add a a new file to the build system. I would guess that unless you change the build options, the cached files will still be valid.