[PATCH] D23455: [Tooling] Parse compilation database command lines properly on Windows

Brad King via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 15 11:00:45 PDT 2016


brad.king added a comment.

> the feasibility of emitting 'arguments' instead of 'command' into the JSON compilation database.


CMake constructs the command lines internally using string replacement on templates.  We never actually know the exact arguments.  Therefore providing arguments instead of the whole command would require parsing to be done on the CMake side instead.  This is theoretically possible because we do know the shell for which we are generating (Windows `cmd` versus MSYS `sh`).  However, it may also require a bunch of logic we don't have yet but that LLVM does.

Alternatively, the JSON could have an additional `command_shell="..."` field that indicates the shell for which the command line is encoded.


https://reviews.llvm.org/D23455





More information about the cfe-commits mailing list