This is an archive of the discontinued LLVM Phabricator instance.

[clangd] Add documentation for building and testing clangd
ClosedPublic

Authored by kadircet on Nov 10 2020, 10:22 AM.

Details

Summary

Adds minimal cmake configuration required to build and test clangd,
while telling target names. Should be helpful for people unfamiliar with the
LLVM repo.

See https://github.com/clangd/clangd/issues/579 for a request.

Diff Detail

Event Timeline

kadircet created this revision.Nov 10 2020, 10:22 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 10 2020, 10:22 AM
kadircet requested review of this revision.Nov 10 2020, 10:22 AM
nridge added a subscriber: nridge.Nov 10 2020, 4:28 PM
nridge added inline comments.
clang-tools-extra/clangd/README.md
30

I guess it might depend on whether you just want to build from source, or if you're doing clangd development. For development purposes, I find release builds to be very hard to debug due to inlining and other optimizations.

kadircet added inline comments.Nov 11 2020, 1:09 AM
clang-tools-extra/clangd/README.md
30

yeah i suppose it might make sense to add something like CXX_FLAGS="-gmlt -O1" but I am not sure if we mention that in this minimal one :/

sammccall accepted this revision.Nov 19 2020, 12:55 PM

Thanks!

clang-tools-extra/clangd/README.md
26

this will work, though won't it use make by default with no parallelism?

If we're recommending more flags, i'd suggest -DLLVM_ENABLE_ASSERTS=On, and -G Ninja...

27

nit: traditionally Release rather than RELEASE (though IDK if it matters)

This revision is now accepted and ready to land.Nov 19 2020, 12:55 PM
kadircet updated this revision to Diff 306633.Nov 20 2020, 2:34 AM
kadircet marked 2 inline comments as done.
  • Mention assertions and ninja
clang-tools-extra/clangd/README.md
26

i wanted to keep it to a bare minimum, hence no mentions of ninja and asserts. i am adding a paragraph below to suggest adding those.

I wonder, should these instructions be in an easier-to-find place, such as the clangd repo's own README (https://github.com/clangd/clangd/blob/master/README.md), or even a section of the clangd website (clangd.llvm.org)?

I wanted to send build instructions to someone who was asking for them, and it took me a while to find this (had to come back and find this review request to see what page was ultimately edited here).

Herald added a project: Restricted Project. · View Herald TranscriptJul 14 2021, 9:13 AM