llvm-wasm icon indicating copy to clipboard operation
llvm-wasm copied to clipboard

Could you please provide guides for building `clang` to wasm?

Open guyutongxue opened this issue 1 year ago • 1 comments

Hello! I'm interested in your project (for detailed guide of building LLVM on WASM). I noticed that the GitHub Page is using clang-wasm branch which includes a clang.wasm, but the README only shows how to build llc / lld.

In detail, I'm trying to build clangd language server and face some issues on finding Standard C/C++ library headers in Emscripten FS. Could you tell me how to embed (and how to find) those C/C++ headers to WASM? Seems that the original README just embedding lib folder is not a correct approach for clang.

Thank you!

guyutongxue avatar Jan 28 '24 06:01 guyutongxue

Hi! Yes, the README needs some updating - it was initially only for llc & lld, but the demo page uses clang instead of llc. IIRC clang was compiled as part of building llc & lld so I only had to export clang.* - will check again.

I haven't compiled clangd though, that'd be interesting to try!

soedirgo avatar Jan 30 '24 05:01 soedirgo