[Webkit-unassigned] [Bug 182689] Unified builds broke ycm autocompletion using compilation databases

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Dec 28 11:06:12 PST 2018


https://bugs.webkit.org/show_bug.cgi?id=182689

--- Comment #26 from Carlos Eduardo Ramalho <cadubentzen at gmail.com> ---
(In reply to Yusuke Suzuki from comment #25)
> 
> Yeah, do you know the way only generating compile_commands.json?
> If we can do that, hacky (but It Works (TM)) way can be usable!
> 
> 1. First, generate JSON w/o unified builds
> 2. Build w/ unified builds (generates appropriate headers etc.)
> 3. Happy!

At first I thought of doing it manually, but it is counter-productive because it won't get eventual new flags or new sources files and one would have to generate the project by hand.

Two hack-ish ways I can think of acomplishing it:

- add a new script that would generate the project - but not build -, get the compile_commands.json and delete/move the build folder and then actually build it after configuring with unified sources. It would add another script though :( or could be an option passed to build-webkit script.

- (way more intrusive) add cmake library targets, excluded from the "all" target, containing the original sources and with the same properties as the actually built targets - that are compiled with unified sources - and use these targets only to add entries in compile_commands.json file. I would be something like `add_library(JavaScriptCoreOriginalSources ... EXCLUDE_FROM_ALL)`. Hopefully a macro in the right place would do it well. This way it would get changes introduced during development without manual interventation. Of course enabling this only under an option. Haven't tested this approach yet.

Personally I don't like either option too much. Any thoughts on the ideas or another idea?

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20181228/32c0d33b/attachment.html>


More information about the webkit-unassigned mailing list