Build: update

Fangrui Song 2025-08-14 22:30:14 -07:00
parent ac7f2c8e7b
commit 9f2230b7d9

@ -15,8 +15,8 @@ The simplest/quickest build with all defaults (only for POSIX systems) is:
git clone --depth=1 --recursive https://github.com/MaskRay/ccls git clone --depth=1 --recursive https://github.com/MaskRay/ccls
cd ccls cd ccls
# Download "Pre-Built Binaries" from https://releases.llvm.org/download.html # Download "LLVM-20.1.8-Linux-X64.tar.xz" assets from https://github.com/llvm/llvm-project/releases/
# and unpack to /path/to/clang+llvm-xxx. # ("Pre-Built Binaries" from https://releases.llvm.org/download.html)
# Do not unpack to a temporary directory, as the clang resource directory is hard-coded # Do not unpack to a temporary directory, as the clang resource directory is hard-coded
# into ccls at compile time! # into ccls at compile time!
# See https://github.com/MaskRay/ccls/wiki/FAQ#verify-the-clang-resource-directory-is-correct # See https://github.com/MaskRay/ccls/wiki/FAQ#verify-the-clang-resource-directory-is-correct
@ -36,16 +36,6 @@ Proceed with `cmake --build Release` and, if successful, `cd Release && sudo mak
**Note** You will need `sudo apt-get install libclang-10-dev` as well for Ubuntu 20.04 build. **Note** You will need `sudo apt-get install libclang-10-dev` as well for Ubuntu 20.04 build.
Ubuntu 18.04 prebuilt binaries are actually suitable for many non-Ubuntu distributions.
You may replace the last two **cmake** commands with:
```sh
wget -c http://releases.llvm.org/8.0.0/clang+llvm-8.0.0-x86_64-linux-gnu-ubuntu-18.04.tar.xz
tar xf clang+llvm-8.0.0-x86_64-linux-gnu-ubuntu-18.04.tar.xz
cmake -S. -BRelease -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=$PWD/clang+llvm-8.0.0-x86_64-linux-gnu-ubuntu-18.04
cmake --build Release
```
The resulting executable will be `Release/ccls`. The resulting executable will be `Release/ccls`.
If you forgot to pass `--recursive` when cloning the repo, `git submodule update --init` to clone the rapidjson repository. If you forgot to pass `--recursive` when cloning the repo, `git submodule update --init` to clone the rapidjson repository.