[webkit-dev] Using compile_command.json in sources that go into Unified Sources
Cadu Bentzen
cadubentzen at gmail.com
Sat Mar 24 16:03:17 PDT 2018
Hi WebKit developers,
Recently I started coding in WebKitGTK+ on Linux and I realized that source
files that are batch-compiled in UnifiedSources don't get an entry in
compile_commands.json, making it difficult to get flags for autocompletion,
"go-to definition" and conditional highlighting feature in IDEs.
Do you currently have a workaround for that?
In my local branch I wrote a script to "expand" compile_commands.json
entries of UnifiedSources into entries of the source files contained in
them.
For example, if JavascriptScore/UnifiedSource2.cpp has
#include "API/JSBase.cpp"
#include "API/JSCTestRunnerUtils.cpp"
#include "API/JSCallbackConstructor.cpp"
The script replaces the entry
of UnifiedSource2.cpp by three entries (one for each source file) with the
same flags but replacing the "file" field with the path to those source
files.
I included calling this script at the end of the build-webkit (under a
command line option) script. So far it has work for me, but I wonder if
this is the right approach or if you already solved that in another way.
Best regards,
Cadu Bentzen.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20180324/a73808c5/attachment.html>
More information about the webkit-dev
mailing list