Last active
September 1, 2022 22:19
-
-
Save jakob/929ed728c96741a119798647a32618ca to your computer and use it in GitHub Desktop.
How To Build clangd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 tosudo update-alternatives --install /usr/bin/clangd clangd ./bin/clangd 100
,it‘s OK. Anyway, thx your sharing.