Stream: wamr

Topic: wamr on RISC-V


view this post on Zulip Mats Brorsson (May 12 2023 at 12:06):

I can build iwasm interpreter for RISC-V, but has anyone here succesfully configured and build any of the JIT or AOT options for RISC-V?

view this post on Zulip lum1n0us (May 14 2023 at 10:51):

Hope it is useful

RISCV64, RISCV32 (RISC-V LP64 and RISC-V LP64D are tested) https://github.com/bytecodealliance/wasm-micro-runtime#supported-architectures-and-platforms

https://github.com/bytecodealliance/wasm-micro-runtime/blob/main/product-mini/README.md#esp-idf

WebAssembly Micro Runtime (WAMR). Contribute to bytecodealliance/wasm-micro-runtime development by creating an account on GitHub.
WebAssembly Micro Runtime (WAMR). Contribute to bytecodealliance/wasm-micro-runtime development by creating an account on GitHub.

view this post on Zulip Mats Brorsson (May 24 2023 at 13:13):

lum1n0us said:

Hope it is useful

RISCV64, RISCV32 (RISC-V LP64 and RISC-V LP64D are tested) https://github.com/bytecodealliance/wasm-micro-runtime#supported-architectures-and-platforms

https://github.com/bytecodealliance/wasm-micro-runtime/blob/main/product-mini/README.md#esp-idf

Well, as I wrote, I can build the interpreter but what about the JIT or AOT compilers? Those does not seem to be supported for RISCV64.

view this post on Zulip Wenyong Huang (May 25 2023 at 09:03):

Hi, the LLVM AOT is also supported, please
Build iwasm:
64-bit: cmake -DWAMR_BUILD_TARGET=RISCV64/RISCV64_LP64D/RISCV_LP64
32-bit: cmake -DWAMR_BUILD_TARGET=RISCV32/RISCV32_ILP32D/RISCV_ILP32

Generate AOT file:
64-bit: wamrc --target=riscv64 --target-abi=lp64/lp64d -o test.aot test.wasm
32-bit: wamrc --target=riscv32 --target-abi=ilp32/ilp32d -o test.aot test.wasm

For LLVM JIT, I remember it is also supported, please try adding -DWAMR_BUILD_JIT=1 when building iwasm.

view this post on Zulip Mats Brorsson (May 25 2023 at 14:45):

Thanks, I already have an LLVM installation. Can I use that or do I really need to build the llvm that is in the WAMR tree?

view this post on Zulip YAMAMOTO Takashi (May 26 2023 at 09:29):

eg. cmake -DLLVM_DIR=/usr/local/opt/llvm@14/lib/cmake/llvm

view this post on Zulip Mats Brorsson (May 31 2023 at 06:00):

Thanks, but should LLVM_DIR point to the LLVM source directory or something else?

view this post on Zulip YAMAMOTO Takashi (Jun 17 2023 at 18:08):

it's the directory containing cmake files. eg LLVMConfig.cmake
i sometimes use a directory under llvm build tree. eg. build/lib/cmake/llvm


Last updated: Nov 22 2024 at 16:03 UTC