-MJ<arg>
Write a compilation database entry per input
It is not immediately clear to me how this could/should be used in clang-build and whether that would make sense currently. It seems we would have to use it for each file in the project, and then merge the outputs into a JSON-formatted compilation database, see also https://github.com/Sarcasm/notes/blob/master/dev/compilation-database.rst#clang
It seems that for example gcc does not have this command line option, so maybe it would not be beneficial to let clang do it - we should ideally be able to generate a database for any toolchain.
This is a continuation of issue #109.
I discovered that clang, since version 5.0, contains a
-MJ
flag which outputs compilation database entries:It is not immediately clear to me how this could/should be used in clang-build and whether that would make sense currently. It seems we would have to use it for each file in the project, and then merge the outputs into a JSON-formatted compilation database, see also https://github.com/Sarcasm/notes/blob/master/dev/compilation-database.rst#clang
It seems that for example gcc does not have this command line option, so maybe it would not be beneficial to let clang do it - we should ideally be able to generate a database for any toolchain.