Compiling clangd to WebAssembly

(originally posted on clangd-dev here)

Hi all,

As a learning exercise I am trying to compile clangd as a WebAssembly target, with the eventual goal of using it as a Language Server in conjunction with monaco, the code editor behind Visual Studio Code.

So far I’ve successfully built all combinations of LLVM, clang and clangd on macOS and Ubuntu. The build system is very easy to use, but rather complex to understand for someone with limited experience like myself.

Are there any pointers to help me better understand clangd’s Makefile? Walking up the tree of parent files and environment variables hasn’t brought any clarity.

P.S. before I got any further, has anyone else tried this?

Jonathan Beri.