git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Constant recompilation when GENERATE_COMPILATION_DATABASE is set

From
brian m. carlson <sandals@crustytoothpaste.net>
Date
Oct 27, 2023, 11:45 UTC
Message-ID
<ZTui2NcJ3Ax_PIGO@tapette.crustytoothpaste.net>

I typically use clangd with Git for the nice language server protocol (LSP) support. I noticed that when GENERATE_COMPILATION_DATABASE is set (which is used so clangd can find the proper flags), `make` rebuilds all of the files every time, even if I do it back to back. This persists even after a `git clean -dxf`.

Obviously, this is not great, since it means the turnaround time to compile changes is slower. Unfortunately, I'm not a huge expert in make and I'm unsure what the right solution is here. I'd appreciate anyone's thoughts on how to improve this.

This is on a Debian sid (unstable) amd64 system with the following configuration. The version of clang in use is Debian's 16.0.6.

---- NO_OPENSSL=1 DC_SHA1=1 NETTLE_SHA256=1 DEVELOPER=1 NO_SVN_TESTS=1 NO_PYTHON=1 USE_ASCIIDOCTOR=1 USE_ASCIIDOCTOR_MANPAGE=1 CC=clang GENERATE_COMPILATION_DATABASE=yes CSPRNG_METHOD=getrandom getentropy ----

-- 
brian m. carlson (he/him or they/them)
Toronto, Ontario, CA
Next: Philippe Blain
Message 1 of 3 in “Constant recompilation when GENERATE_COMPILATION_DATABASE is set”
  1. brian m. carlsonOct 27, 2023
  2. Philippe BlainOct 27, 2023
  3. brian m. carlsonOct 27, 2023

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.