Skip to content

Instantly share code, notes, and snippets.

@jakob
Last active Sep 25, 2020
Embed
What would you like to do?
How To Build clangd
#!/bin/bash
set -e
mkdir clangd
cd clangd/
svn co http://llvm.org/svn/llvm-project/llvm/trunk llvm
cd llvm/tools
svn co http://llvm.org/svn/llvm-project/cfe/trunk clang
cd ../..
cd llvm/tools/clang/tools
svn co http://llvm.org/svn/llvm-project/clang-tools-extra/trunk extra
cd ../../../..
mkdir build
cd build
cmake -G "Unix Makefiles" ../llvm
make clangd
# Add binary to your $PATH
echo $PWD/bin | sudo tee /etc/paths.d/clangd
@kangzhiheng

This comment has been minimized.

Copy link

@kangzhiheng kangzhiheng commented Apr 7, 2020

THX! I use your bash and make clangd (Line 20) successfully, but I have a problem when I run Line 23. I modified Line 23 to sudo update-alternatives --install /usr/bin/clangd clangd ./bin/clangd 100,it‘s OK. Anyway, thx your sharing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment