This is an archive of the discontinued LLVM Phabricator instance.

[clangd] Look for compilation database in `build` subdirectory of parents.
ClosedPublic

Authored by sammccall on Apr 22 2020, 5:24 AM.

Details

Summary

This matches the conventional location of cmake build directories.
It also allows creating a build symlink, which seems more flexible than the
compile_commands.json symlinks.

Diff Detail

Event Timeline

sammccall created this revision.Apr 22 2020, 5:24 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 22 2020, 5:24 AM
kadircet accepted this revision.Apr 23 2020, 11:57 PM

sorry this fell of my radar. LGTM.

As discussed offline i am a little bit worried about regressing the case when there's a build in a subdirectory, and a (merged) compilation database of some sort in a parent directory. But I suppose this is a rare-ish use case.

now I can delete my symlink :)

This revision is now accepted and ready to land.Apr 23 2020, 11:57 PM
This revision was automatically updated to reflect the committed changes.