diff options
author | Matthias Maennich <maennich@google.com> | 2021-11-19 17:49:00 +0000 |
---|---|---|
committer | Matthias Maennich <maennich@google.com> | 2021-11-23 20:42:46 +0000 |
commit | b6a1699a69b5b361e6a06c507e8e98fc32933bed (patch) | |
tree | 1684a315c6eb0ec68020a736639405bcc648db47 /interceptor/log.proto | |
parent | beb9109a195483e8cdcd2d3f6acdea35e38d87c5 (diff) | |
download | build-tools-b6a1699a69b5b361e6a06c507e8e98fc32933bed.tar.gz |
interceptor: Support for emitting compile_commands.json
The analysis command learned how to emit compile_command.json databases
based on the recorded command log. A sample execution is:
$ interceptor_analysis -l /tmp/log -o compile_command.json -t compdb
Bug: 205731786
Bug: 201801372
Signed-off-by: Matthias Maennich <maennich@google.com>
Change-Id: I00d08d309f51b9263900cab517baa824c3be45c2
Diffstat (limited to 'interceptor/log.proto')
-rw-r--r-- | interceptor/log.proto | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/interceptor/log.proto b/interceptor/log.proto index e339878..a3650ec 100644 --- a/interceptor/log.proto +++ b/interceptor/log.proto @@ -38,3 +38,17 @@ message Log { string root_dir = 1; // ${ROOT_DIR} or cwd() if unset repeated Command commands = 2; } + +// A compile_command.json entry as specified in +// https://clang.llvm.org/docs/JSONCompilationDatabase.html +message CompileCommand { + string directory = 1; + string file = 2; + string command = 3; + repeated string arguments = 4; + string output = 5; +} + +message CompilationDatabase { + repeated CompileCommand commands = 1; +} |