[PATCH] D110983: Add .cmt and .cmti files for OCaml bindings

shiwei weng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Oct 3 22:32:54 PDT 2021


arbipher accepted this revision.
arbipher added a comment.
This revision is now accepted and ready to land.

This change looks good to me. Thank you all.

I tested it (the latest llvm commit plus this diff) on my ubuntu 20.04 on wsl. The build of static OCaml binding works fine. I can dump the `cmt` `cmti` file with `ocamlcmt` tool.

The `.cmt` and `.cmit` files are just binary format of the typed AST (ocaml manudl on cmt <https://ocaml.org/manual/native.html#s:native-overview>, the last para of the section), and used by code tools. They are useful and harmless.

-----

Usually, the LLVM OCaml binding is provided for OCaml users via `opam`, just like `cargo` for rust or `pip` for python. I made the opam package for llvm 12 binding. 
I can make the newly released llvm 13 binding later, with this change as a patch and some slight change there <https://github.com/ocaml/opam-repository/blob/master/packages/llvm/llvm.12.0.1/files/install.sh#L28> - to copy these `cmt/cmti` files.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D110983/new/

https://reviews.llvm.org/D110983



More information about the llvm-commits mailing list