Stas
Stas

Reputation: 11761

Build native executable with profile information using Ocamlbuild

How to build with enabled profile information using Ocamlbuild? It seems -p doesn't work there.

Now, I use 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

Upvotes: 3

Views: 699

Answers (1)

nlucaroni
nlucaroni

Reputation: 47934

You can pass the argument explicitly,

ocamlbuild -cflags -p

or in your _tags file,

true : profile

There is also a rule for the file-name,

ocamlbuild test.p.native

Upvotes: 6

Related Questions