<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Hi everyone,</div><div><br></div><div>I am trying to build a JIT for the RISC-V platform, but I could not figure out how. Could you provide some hints? Great thanks!<br></div><div><br></div><div> Initially, I found that LLVM has RISCV backend, and I compiled it following the instructions <a href="https://github.com/lowRISC/riscv-llvm">here</a>. I got a cross-compiler version of clang (running on x86 and the generated binary runs on RISC-V), but the lli is still a X86 tool.</div><div><br></div><div>Then, I tried to build LLVM with <a href="https://github.com/riscv/riscv-gnu-toolchain">riscv-gnu-toolchain</a>, and I got many tools such as llc working on RISC-V properly. However, the lli still could not work properly. When I tried to process the LLVM bytecode file (.ll file) on RISC-V using lli, I got the error:</div><div><i>         error creating EE: No available targets are compatible with this triple.</i></div><div>Furthermore, when I typed: <i>lli -version</i>, I got:<font size="1"><i><br>  LLVM version 7.0.0svn<br>  DEBUG build with assertions.<br>  Default target: x86_64-unknown-linux-gnu<br>  Host CPU: (unknown)</i></font></div><div>But when I typed: llc -version (llc works fine), I got:<font size="1"><br>  LLVM version 7.0.0svn<br>  DEBUG build with assertions.<br>  Default target: x86_64-unknown-linux-gnu<br>  Host CPU: (unknown)<br>  Registered Targets:<br>    riscv32 - 32-bit RISC-V<br>    riscv64 - 64-bit RISC-V<br>    x86     - 32-bit X86: Pentium-Pro and above<br>    x86-64  - 64-bit X86: EM64T and AMD64</font><br></div><div>It seems that the lli tool does not support RISC-V target.</div><div><br></div><div>Could anyone give me some hints? Thank you so much!!</div><div><br></div><div>Best,</div><div>Rui<br></div><div><br></div><div><br></div></div></div></div></div>