Build your own executable with profile information using Ocamlbuild

How to build with profile information included using Ocamlbuild? It -p

doesn't seem to work there.

Now I am using ocamlopt

for this. For example,

$ ocamlfind ocamlopt -c -p -thread -package core test.ml
$ ocamlfind ocamlopt -p -o test -thread -package core -linkpkg test.cmx

      

How to do the same with

ocamlbuild -user-ocamlfind test.native

      

+3


source to share


1 answer


You can pass the argument explicitly,

ocamlbuild -cflags -p

      

or in your _tags

file,



true : profile

      

There is also a rule for the filename,

ocamlbuild test.p.native

      

+5


source







All Articles