llvm OCaml bindings

后端 未结 1 906
南方客
南方客 2021-02-12 02:31

I\'m working on llvm OCaml bindings.

I installed llvm package through opam (opam install llvm), when I use llvm in utop, I get the following error:

         


        
相关标签:
1条回答
  • 2021-02-12 03:16

    (as I'm asked to answer my own question...)

    To use system toplevel

    ocamlmktop -o llvmtop llvm.cma -cc g++

    Then launch llvmtop, you can use llvm bindings after open Llvm.

    I haven't found an equivalent for utop yet..


    To use utop

    Thanks to the utop documentation here

    1. create a myutop_main.ml file:

      let () = UTop_main.main ()

    2. create a custom utop with llvm bindings:

      ocamlfind ocamlmktop -o llvmutop -thread -linkpkg -package utop -package llvm myutop_main.ml -cc g++

    0 讨论(0)
提交回复
热议问题