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

Sta*_*tas 3 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
Run Code Online (Sandbox Code Playgroud)

怎么做同样的

ocamlbuild -user-ocamlfind test.native
Run Code Online (Sandbox Code Playgroud)

nlu*_*oni 6

你可以明确地传递参数,

ocamlbuild -cflags -p
Run Code Online (Sandbox Code Playgroud)

或者在你的_tags文件中

true : profile
Run Code Online (Sandbox Code Playgroud)

文件名也有一个规则,

ocamlbuild test.p.native
Run Code Online (Sandbox Code Playgroud)