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
{
po.clangd? clangd.Finish@;
po.clangd? clangd.Finish ¬po.dry;
# else, regular build
success Run cachedBin
{ 𝕊:

View File

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