Stream: wasi

Topic: Cross-build wasi-sdk and sysroot for RISCV64


view this post on Zulip Mats Brorsson (Jun 07 2023 at 07:45):

I have a VisionFive2 RISCV64 boards and I would like to build wasi-sdk and sysroot for it. The amount of memory seems to be too small for building natively so I wonder how I best can do a cross-build on my x86-machine?

view this post on Zulip Dan Gohman (Jun 07 2023 at 14:41):

The wasi-sdk build scripts are set up to build LLVM and then build wasi-libc using that LLVM, which I assume won't work if you're building LLVM with a cross-compiler. But if you can split out the LLVM build into a separate step, it should be possible to build LLVM to run on RISCV64 with a cross-compiler and then build wasi-libc etc. with a separate wasm32-wasi compiler running on your build host, that should work.

view this post on Zulip Mats Brorsson (Jun 07 2023 at 16:47):

Thanks! I found a docker image with a simulated riscv machine running Ubuntu and I am building on that.


Last updated: Dec 23 2024 at 12:05 UTC