Allow YouCompleteMe to use a compile-commands database

YCM will support clang compile-commands.json database. The completion
performance is much better than manually determining the flags from
ninja.

All you need to do is:
 gn gen out/.. --export-compile-commands

By adding --export-compile-commands clang will produce a
compile-commands.json file in the build directory. Next, the
ycm_extra_conf.py script will check an env variable called
CHROMIUM_BUILD_DIR for a compile-commands.json file and if it
exists it will prefer it to using the old ninja method.

BUG=None
TEST=Locally w/ a database

Change-Id: I2f68fc422fc00a4c9c35fc114d78ed6a92454595
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4392504
Reviewed-by: Ɓukasz Anforowicz <[email protected]>
Commit-Queue: Brian Geffon <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1125446}
NOKEYCHECK=True
GitOrigin-RevId: 4f26a06f28764ea9ec80b76bd44b4a80361d3366
1 file changed