[PATCH] Header dependencies support for modularize
kim.grasman at gmail.com
Wed Aug 21 06:06:54 PDT 2013
On Wed, Aug 21, 2013 at 2:48 PM, Thompson, John
<John_Thompson at playstation.sony.com> wrote:
> This would seem to have a prerequisite that ClangTooling have a OptTable
> somewhere, but there doesn’t seem to be a connection.
> Now let’s suppose I get past that hurdle, either by creating one myself and
> somehow coercing it to parse the arguments given to ArgumentsAdjuster, how
> do I use libOption to walk the arguments and figure out which command-line
> argument is the source file?
> Ideally, tooling should have a mechanism to tell me what the source file or
> files are for each command line in the compilation database. I had a much
> simpler version, but it required I modify ArgumentsAdjuster to be given the
> source file, which the caller had handy, but I couldn’t get that change
> Could someone associated with tooling lend a hand and tell me how to get the
> input file from the command lines in the compilation database?
I can't help, but I'm struggling with the same thing right now.
Our tool is originally designed to act as a replacement for clang in
Make build systems, so it accepts the same command-line (plus some
additional, escaped options)
I've wanted to add compilation database support, but the way tooling
is wired it seems I need to extract compilation db and source paths
from the command-line and pass them to ClangTool::ClangTool. The
compilation db is (sort of) handled by FixedCompilationDatabase, but
it seems the source paths are assumed to be tool arguments, not Clang
More information about the cfe-commits