<div dir="ltr">Hello cfe-dev,<div><br></div><div>At present unknown keys in the compile_commands.json file will cause the JSONCompilationDatabase parser to reject the file.</div><div><br></div><div>1. Would a patch to relax this constraint be accepted?</div>
<div>2. Would other consumers of the compile_commands.json be negatively impacted by unknown keys?</div><div><br></div><div>The motivating example (somewhat contrived) involves a single TU built with a different environment in two different targets </div>
<div><br></div><div>int main()</div><div>{</div><div>    TYPE i = -1;</div><div>    return i < 0;</div><div>}</div><div><br></div><div>cc -DTYPE=int source.c -o bin1</div><div>cc -DTYPE=uint16_t source.c -o bin2</div><div>
<br></div><div>So for my use case I'd like to add a (purely optional) target name to the compilation database (generated via cmake) - in order to be able to provide more accurate diagnostics to the user.</div><div><br>
</div><div>Cheers,</div><div><br></div><div>-nick</div></div>