Skip to content

Instantly share code, notes, and snippets.

@ilya-biryukov
Created April 21, 2018 20:14
Show Gist options
  • Save ilya-biryukov/e888d4aa8676a4f1e0e72e8b56306c57 to your computer and use it in GitHub Desktop.
Save ilya-biryukov/e888d4aa8676a4f1e0e72e8b56306c57 to your computer and use it in GitHub Desktop.
Build and use global index in clangd
# First, build the index builder.
ninja global-symbol-builder
# $LLVM_PATH is source directory of LLVM.
# compile_commands.json (or a symlink to it) should be there.
# Running this takes considerable time (> 30 mins).
./bin/global-symbol-builder -executor=all-TUs $LLVM_PATH > $HOME/llvm_clangd.symbols
# Run clangd with the following arg to make it pick up the built index:
# -yaml-symbol-file=$HOME/llvm_clangd.symbols
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment