使用Ocamlbuild构建具有配置文件信息的本机可执行文件

问题描述:

如何使用Ocamlbuild构建启用配置文件信息?看起来-p在那里不起作用。使用Ocamlbuild构建具有配置文件信息的本机可执行文件

现在,我为此使用ocamlopt。例如,

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

如何做同样的

ocamlbuild -user-ocamlfind test.native 

你可以通过明确的说法,

ocamlbuild -cflags -p 

或在您的_tags文件,

true : profile 

还有一个rul e为文件名,

ocamlbuild test.p.native 
+0

'ocamlbuild -cflags -p'在我的机器上不起作用。这正是我想要做的。看起来'-cflags'只用于'ocamlc'。 'test.p.native'和'true:profile'按预期工作。非常感谢! – Stas 2013-02-09 06:10:25

+0

谢谢,我做了一个可行的假设,我的歉意。 – nlucaroni 2013-02-09 16:33:08