build/build: handle dry-run clangd
This commit is contained in:
parent
d63e5ab714
commit
ce4461ff44
@ -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
|
||||
{ 𝕊:
|
||||
|
||||
@ -82,14 +82,19 @@ ModifyCBQNFlags ← {
|
||||
}
|
||||
|
||||
objects ← ⟨⟩
|
||||
Finish ⇐ { 𝕊:
|
||||
Finish ⇐ { 𝕊 write:
|
||||
objects ModifyCBQNFlags⌾(({"src/"≡4↑⊑𝕩}¨ objects)⊸/)↩
|
||||
FileObj ← { name‿flags:
|
||||
"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∾↩ <⟨𝕩, (𝔽@)∾<𝕩⟩}
|
||||
Loading…
Reference in New Issue
Block a user