Install LLVM OCaml bindings (and UTop)
I put on a Stackoverflow answer here
-
Build LLVM with configuration:
--with-ocaml-libdir =ocamlc -where`` -
To compile LLVM codes:
ocamlc -cc g++ llvm.cma test.ml -o test -
To make UTop work:
-
create a
myutop_main.mlfile with:let () = UTop_main.main () -
create a custom
llvmutop:ocamlfind ocamlmktop -o llvmutop -thread -linkpkg -package utop llvm.cma myutop_main.ml -cc g++
-
-
If you just want OCaml's build-in toplevel:
ocamlmktop -o llvmtop llvm.cma -cc g++
Comments
Comments powered by Disqus