[PATCH] D110983: Add .cmt and .cmti files for OCaml
TN Khanh via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 1 21:40:26 PDT 2021
tnkhanh updated this revision to Diff 376670.
tnkhanh added a comment.
We can build .cmt and .cmti files for easier code navigation for OCaml bindings
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D110983/new/
https://reviews.llvm.org/D110983
Files:
llvm/cmake/modules/AddOCaml.cmake
Index: llvm/cmake/modules/AddOCaml.cmake
===================================================================
--- llvm/cmake/modules/AddOCaml.cmake
+++ llvm/cmake/modules/AddOCaml.cmake
@@ -103,6 +103,9 @@
list(APPEND ocaml_inputs "${bin}/${ocaml_file}.mli" "${bin}/${ocaml_file}.ml")
list(APPEND ocaml_outputs "${bin}/${ocaml_file}.cmi" "${bin}/${ocaml_file}.cmo")
+
+ list(APPEND ocaml_outputs "${bin}/${ocaml_file}.cmti" "${bin}/${ocaml_file}.cmt")
+
if( HAVE_OCAMLOPT )
list(APPEND ocaml_outputs
"${bin}/${ocaml_file}.cmx"
@@ -152,7 +155,8 @@
add_custom_command(
OUTPUT ${ocaml_outputs}
- COMMAND "${OCAMLFIND}" "ocamlmklib" "-o" "${name}" ${ocaml_flags} ${ocaml_params}
+ COMMAND "${OCAMLFIND}" "ocamlmklib" "-ocamlcflags" "-bin-annot"
+ "-o" "${name}" ${ocaml_flags} ${ocaml_params}
DEPENDS ${ocaml_inputs} ${c_outputs}
COMMENT "Building OCaml library ${name}"
VERBATIM)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D110983.376670.patch
Type: text/x-patch
Size: 951 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211002/af2b1e66/attachment.bin>
More information about the llvm-commits
mailing list