build/build: handle dry-run clangd

This commit is contained in:
dzaima 2024-04-20 21:20:59 +03:00
parent d63e5ab714
commit ce4461ff44
2 changed files with 9 additions and 4 deletions

View File

@ -795,7 +795,7 @@ cachedBin‿linkerCache ← {
outPath •wdpath •file.At po.output outPath •wdpath •file.At po.output
{ {
po.clangd? clangd.Finish@; po.clangd? clangd.Finish ¬po.dry;
# else, regular build # else, regular build
success Run cachedBin success Run cachedBin
{ 𝕊: { 𝕊:

View File

@ -82,14 +82,19 @@ ModifyCBQNFlags ← {
} }
objects objects
Finish { 𝕊: Finish { 𝕊 write:
objects ModifyCBQNFlags(({"src/"4𝕩}¨ objects)/) objects ModifyCBQNFlags(({"src/"4𝕩}¨ objects)/)
FileObj { nameflags: FileObj { nameflags:
"file""directory""arguments" JObj JStr name, JStr AtRoot "", ", " JArr JStr¨ flags "file""directory""arguments" JObj JStr name, JStr AtRoot "", ", " JArr JStr¨ flags
} }
res (","n) JArr FileObj¨ objects res (","n) JArr FileObj¨ objects
resPath AtRoot "compile_commands.json" resPath AtRoot "compile_commands.json"
{
write?
resPath •FChars res resPath •FChars res
•Out "Wrote clangd compile commands to "•file.At resPath •Out "Wrote clangd compile commands to "•file.At resPath
;
•Out "Would write clangd compile commands to "•file.At resPath
}
} }
_add {objects <𝕩, (𝔽@)<𝕩} _add {objects <𝕩, (𝔽@)<𝕩}