This code builds a minimal JIT engine to execute LLVM-IR. It does not cover generation of LLVM-IR.
sudo apt-add-repository "deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-10 main"
sudo apt-get install libllvm10 llvm-10-dev clang-10
make
This should produce an executable named lljit.exe
.
examples/helloworld.ll
andjitentry
in it. It should print./lljit.exe examples/helloworld.ll
clang-10 -emit-llvm -S helloworld.c
Building the project should also build testsuite.exe
, which can
simply be run as ./testsuite.exe
, and it will JIT compile and
run the helloworld.ll
example described above.