From ed1fe6cc3e72a3eabbf357568725f5ab79bf63bd Mon Sep 17 00:00:00 2001 From: dzaima Date: Tue, 3 Dec 2024 11:03:34 +0200 Subject: [PATCH] don't put needlessly absolute paths in Singeli compile commands --- build/src/clangd.bqn | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/build/src/clangd.bqn b/build/src/clangd.bqn index 46bb97ed..d4d70fd1 100644 --- a/build/src/clangd.bqn +++ b/build/src/clangd.bqn @@ -127,12 +127,14 @@ Finish ⇐ { 𝕊 write: "clangd compile commands" res _doWrite AtRoot "build/compile_commands.json" } + AtRootRel ← "../"⊸•file.At + { singeliState≡@? @; dir‿arch ← singeliState - cmd0 ← ⟨"-a", arch, "-l", "="∾AtRoot dir •file.At "include"⟩ + cmd0 ← ⟨"-a", arch, "-l", "="∾AtRootRel dir •file.At "include"⟩ res ← TLArr { cmd‿name: - "file"‿"arguments" JObj ⟨JStr AtRoot name, ", " JArr JStr¨ cmd0 ∾ cmd⟩ + "file"‿"arguments" JObj ⟨JStr AtRootRel name, ", " JArr JStr¨ cmd0 ∾ cmd⟩ }¨ singeliObjects "Singeli compile commands" res _doWrite AtRoot "build/.singeli_compile_commands.json" }