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?
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.
Thanks! I found a docker image with a simulated riscv machine running Ubuntu and I am building on that.
Last updated: Nov 22 2024 at 16:03 UTC