We can build .cmt and .cmti files for easier code navigation for OCaml bindings
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
- Build Status
Buildable 126763 Build 184106: arc lint + arc unit
Event Timeline
The changes here look reasonable enough to me, but unfortunately, I don't know the first thing about OCaml so I'm not certain how valid my review is.
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, 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 - to copy these cmt/cmti files.
@tnkhanh please rebase the patch and resolve conflict with clang-tools-extra/docs/ReleaseNotes.rst. Then I will commit this patch on your behalf.