Closed chouzz closed 3 years ago
Hey @chouzz thanks for your suggestion.
The JSON compilation database spec does not say anything about defaults. I consider that documentation is the north-star, independently how other tools implementing the spec (or what is the default values of those tools).
By emitting the output
field, it can be used as a "key" or "primary key" of the generated database. Which helps to detect duplicate entries when the users are using --append
flag... Because one of the problem with the --append
flag, when the build file changes the compiler flags it might include duplicate entries. Here it helps to have the output
field enabled by default.
Currently,
bear 3.x
setdrop_output_field
to false, thecompile_commands.json
file will contain “output” filed. However, the output field usually does not appear in cmake exported compile_commands.json, andbear2.x
also turns off output by default. So I think it would be better setdrop_output_field
totrue
by default.