Bundling clangd in //third_party/llvm-build

30 views
Skip to first unread message

Will Cassella

unread,
Oct 15, 2021, 2:14:47 PM10/15/21
to Clang maintainers
Hi everyone,

I've been using clangd in neovim to help with Chromium development for a while now, and overall it's an excellent tool. However, a recurring problem has been that since we bundle our own build of clang/llvm in //third_party/llvm-build, the version of clangd I'm using from my system package manager is mismatched with the version of clang that we're building with. This results in errors showing up in clangd which do not show up when compiling (usually due to unrecognized compiler flags), and otherwise slightly different diagnostics. Currently the version of clang we're using in //third_party is 14.0.0, while the version of clangd included in Ubuntu 21.04's repository is 12.0 and the latest version available to download from the LLVM website is 13.0. So short of building clangd from source myself, there's no way to get a build on the same version as what we're compiling with (at least that I'm aware of).

Since we're already going to the trouble of building+bundling our own copy of LLVM, and we already have the infrastructure to include optional components of it (ie, you only get llvm-otool if you have target_os = ['mac'] in your .gclient file), would it be possible to optionally include clangd in there as well?

Thanks,
Will

Kubo Da Costa, Raphael

unread,
Oct 15, 2021, 4:34:24 PM10/15/21
to cl...@chromium.org

What I've done in the meantime is download a recent clangd snapshot from https://github.com/clangd/clangd/releases every now and then and point my editor to it.
Reply all
Reply to author
Forward
0 new messages