diff --git a/Build.md b/Build.md index 2b7c1f5..d539667 100644 --- a/Build.md +++ b/Build.md @@ -285,14 +285,28 @@ ninja -C Release For 2, one possible way is use MSYS2, in MSYS2 MinGW 64-bit shell: -``` +```sh pacman -S mingw-w64-x86_64-clang mingw-w64-x86_64-clang-tools-extra mingw64/mingw-w64-x86_64-polly mingw-w64-x86_64-cmake mingw-w64-x86_64-jq mingw-w64-x86_64-ninja mingw-w64-x86_64-ncurses mingw-w64-x86_64-rapidjson mingw-w64-x86_64-clang-analyzer mingw-w64-x86_64-mlir + +# Download ccls +cd ccls cmake -H. -BRelease -G Ninja -DCMAKE_CXX_FLAGS=-D__STDC_FORMAT_MACROS ninja -C Release ``` `-D__STDC_FORMAT_MACROS` is because otherwise `mingw-w64-headers/crt/inttypes.h` does not define `PRIu64`. +Try running `ccls.exe` once the above command finishes. + +If you encounter `Entry Point Not Found` errors, it's most likely due to missing clang/stdc++ lib files. + +Get a copy of `libclang.dll` and `libstdc++xx.dll` (xx is the version no.) from your `mingw64/bin/` and place them in your `ccls.exe` directory. + +```sh +# Be sure to change libstdc++ version to the one you have in your mingw64/bin/ path +cp /mingw64/bin/libclang.dll /mingw64/bin/libstdc++-6.dll ~/ccls/Release/ +``` + ## Build Clang+LLVM from the git monorepo ```sh