<div dir="ltr">we're planning for a tool that generates a clang compilation database from our byzantine build system.<div><br><div><pre style="overflow-x:auto;overflow-y:hidden;border-color:rgb(12,55,98);border-style:dotted;border-width:thin;margin-top:0px;margin-bottom:12px;padding:0.8em;background-color:rgb(240,240,240);color:rgb(51,51,51)">file.gen: file.src
    cp file.src file.gen

exe: file.o
    gcc -o exe file.o

file.o:</pre><div><br></div><div><pre style="overflow-x:auto;overflow-y:hidden;border-color:rgb(12,55,98);border-style:dotted;border-width:thin;margin-top:0px;margin-bottom:12px;padding:0.8em;background-color:rgb(240,240,240);color:rgb(51,51,51)"><span class="gmail-p">[</span>
  <span class="gmail-p">{</span> <span class="gmail-s2" style="color:rgb(64,112,160)">"directory"</span><span class="gmail-p">:</span> <span class="gmail-s2" style="color:rgb(64,112,160)">"/home/user/llvm/build"</span><span class="gmail-p">,</span>
    <span class="gmail-s2" style="color:rgb(64,112,160)">"command"</span><span class="gmail-p">:</span> <span class="gmail-s2" style="color:rgb(64,112,160)">"/usr/bin/clang++ -Irelative -DSOMEDEF=</span><span class="gmail-se" style="color:rgb(64,112,160);font-weight:bold">\"</span><span class="gmail-s2" style="color:rgb(64,112,160)">With spaces, quotes and </span><span class="gmail-se" style="color:rgb(64,112,160);font-weight:bold">\\</span><span class="gmail-s2" style="color:rgb(64,112,160)">-es.</span><span class="gmail-se" style="color:rgb(64,112,160);font-weight:bold">\"</span><span class="gmail-s2" style="color:rgb(64,112,160)"> -c -o file.o file.cc"</span><span class="gmail-p">,</span>
    <span class="gmail-s2" style="color:rgb(64,112,160)">"file"</span><span class="gmail-p">:</span> <span class="gmail-s2" style="color:rgb(64,112,160)">"file.cc"</span> <span class="gmail-p">},</span>
  <span class="gmail-o" style="color:rgb(102,102,102)">...</span>
<span class="gmail-p">]</span></pre><div><br></div><div><pre style="overflow-x:auto;overflow-y:hidden;border-color:rgb(12,55,98);border-style:dotted;border-width:thin;margin-top:0px;margin-bottom:12px;padding:0.8em;background-color:rgb(240,240,240);color:rgb(51,51,51)"><span class="gmail-p">[</span>
  <span class="gmail-p">{</span> <span class="gmail-s2" style="color:rgb(64,112,160)">"directory"</span><span class="gmail-p">:</span> <span class="gmail-s2" style="color:rgb(64,112,160)">"/home/user/llvm/build"</span><span class="gmail-p">,</span>
    <span class="gmail-s2" style="color:rgb(64,112,160)">"command"</span><span class="gmail-p">:</span> <span class="gmail-s2" style="color:rgb(64,112,160)">"/usr/bin/clang++ -Irelative -DSOMEDEF=</span><span class="gmail-se" style="color:rgb(64,112,160);font-weight:bold">\"</span><span class="gmail-s2" style="color:rgb(64,112,160)">With spaces, quotes and </span><span class="gmail-se" style="color:rgb(64,112,160);font-weight:bold">\\</span><span class="gmail-s2" style="color:rgb(64,112,160)">-es.</span><span class="gmail-se" style="color:rgb(64,112,160);font-weight:bold">\"</span><span class="gmail-s2" style="color:rgb(64,112,160)"> -c -o file.o file.cc"</span><span class="gmail-p">,</span>
    <span class="gmail-s2" style="color:rgb(64,112,160)">"file"</span><span class="gmail-p">:</span> <span class="gmail-s2" style="color:rgb(64,112,160)">"file.cc"</span> <span class="gmail-p">},</span>
  <span class="gmail-o" style="color:rgb(102,102,102)">...</span>
<span class="gmail-p">]</span></pre></div></div></div></div></div>