如何为OCaml配置_oasis以设置“配置文件"标志 [英] How to configure _oasis for OCaml to set 'Profile' flag

查看:99
本文介绍了如何为OCaml配置_oasis以设置“配置文件"标志的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在OCaml中有一个现有项目,并且有一个_oasis文件.我不知道在何处启用ocamlbuild的分析标志.

I have an existing project in OCaml and one _oasis file. I don't know where to enable the profiling flag for ocamlbuild.

我查阅了Oasis手册和代码,发现setup.data中有一个变量profile.我认为这就是Oasis自动生成的.

I looked up Oasis manual and the code, and found there was a variable profile available in setup.data. I assume this was what Oasis auto generated.

我应该在_oasis中的何处以及什么内容中将profile设置为true?

Where and what should I include in _oasis to set profile to true ?

推荐答案

您可以激活ocamlbuild_more_args功能.

_oasis文件顶部:

AlphaFeatures: ocamlbuild_more_args

然后,在您的包裹中:

XOCamlbuildExtraArgs: your_ocamlbuild_option

虽然我在ocamlbuild中找不到任何-profile选项,所以我不确定这是关于什么的.而且,此选项仍然非常不稳定.

I can't find any -profile option in ocamlbuild though, so I'm not sure of what this is about. Also, this option is still quite unstable.

一种更好的处理方法是相应地修改您的_tags文件.它是由oasis生成的,但是您可以对其进行修改.

A better way to handle that would be to modify your _tags file accordingly. It is generated by oasis but you can modify it.

setup.data通知您环境变量.至于配置文件,它显示是否将-p选项传递给ocamlopt.您可以使用NativeOpt字段传递它.

setup.data informs you of environment variables. As for profile, it shows if the -p option will be passed to ocamlopt. You can pass it using the NativeOpt field.

这篇关于如何为OCaml配置_oasis以设置“配置文件"标志的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆