mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-24 20:30:14 +01:00
Since we started bootstrapping, our stage-1 toolchain binaries have been inputs to stage-2 compilations, and to the compilation database logic, they're indistinguishable from generated sources. This caused us to get compilation command lines for them, which clangd would try to index by parsing the binary, and would either run incredibly slowly or crash. Filter out non-source files from the compilation database. In passing, also emit the JSON dump without whitespace, which makes the database a bit smaller and faster for clangd to parse. Assisted-by: Gemini via Antigravity --------- Co-authored-by: Geoff Romer <gromer@google.com>