wasi-sdk
wasi-sdk copied to clipboard
Instructions for compiling `libclang_rt.builtins-wasm32.a`?
I'm trying to use clang-9 to compile and use wasi-sysroot, but additionally the libclang_rt.builtins-wasm32.a file is required to link into the final wasm module. It is not obvious how to build this file without building the llvm/clang submodules first, so it would be much appreciated if you can add relevant instructions. Thanks a lot!
@TerrorJack Did you ever find out how to build libclang_rt.builtins-wasm32.a from source?
libclang_rt.builtins-wasm32.a built a build of llvm's compiler-rt.
You can see how we build it as part of wasi-sdk here: https://github.com/WebAssembly/wasi-sdk/blob/1a953299860bbcc198ad8c12a21d1b2e2f738355/Makefile#L98-L124
If you don't want to build it from source you can download a prebuilt version of this library from one of the releases. e.g. https://github.com/WebAssembly/wasi-sdk/releases/tag/wasi-sdk-12
Then can most likely just copy this library into ./lib/clang/9.0.0/lib/wasi/ inside your existing clang installation.
Is it possible to build libclang_rt.builtins-wasm32.a with -phread?
@turbolent, you mean build it manually or distribute it as a part of the release artifacts?