diff --git a/Project-Setup.md b/Project-Setup.md index 9d10459..f28186f 100644 --- a/Project-Setup.md +++ b/Project-Setup.md @@ -232,6 +232,35 @@ ccls -index ~/Dev/Linux -init='{"clang":{"excludeArgs":[ ], "extraArgs":["--gcc-toolchain=/usr"]}}' ``` +### LLVM multirepo + +```zsh +git clone https://git.llvm.org/git/llvm.git +cd llvm +git clone https://git.llvm.org/git/clang.git tools/clang +git clone https://git.llvm.org/git/lldb.git tools/lldb +git clone https://git.llvm.org/git/lld.git projects/lld +git clone https://git.llvm.org/git/compiler-rt.git projects/compiler-rt +git clone https://git.llvm.org/git/libcxx.git projects/libcxx +git clone https://git.llvm.org/git/libcxxabi.git projects/libcxxabi + +# cmake -H. -BDebug -GNinja -DCMAKE_BUILD_TYPE=Debug -DCMAKE_EXPORT_COMPILE_COMMANDS=On +ln -s Debug/compile_commands.json + +# Let clients know llvm/ is the project root, llvm/tools/clang etc are not. +# emacs-ccls knows this file but other clients may require manual configuration. +touch .ccls-root +``` + +### LLVM monorepo + +```zsh +git clone git@github.com:llvm/llvm-project.git + +# cmake -Hllvm -BDebug -GNinja -DCMAKE_BUILD_TYPE=Debug -DCMAKE_EXPORT_COMPILE_COMMANDS=On -DLLVM_ENABLE_PROJECTS='llvm;clang' +ln -s llvm/compile_commands.json +``` + ### musl ```zsh