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

时间:2013-02-08 19:10:26

标签: ocaml ocamlbuild ocamlfind

如何使用Ocamlbuild构建启用的配置文件信息?似乎-p在那里不起作用。

现在,我使用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

1 个答案:

答案 0 :(得分:6)

您可以明确传递参数,

ocamlbuild -cflags -p

或在您的_tags文件中

true : profile

文件名还有一个规则

ocamlbuild test.p.native