[英]Rebar eunit runs non native (non Hipe) code
我已经使用编译了我的Erlang模块
rebar compile
在rebar.config中使用以下选项
{erl_opts, [native, {hipe, [verbose]}, warnings_as_errors, debug_info]}.
{eunit_compile_opts, [native, {hipe, [verbose]}, warnings_as_errors, debug_info]}.
我看到代码确实已编译为本地代码,因为我在编译过程中看到了Hipe消息,并且.beam文件的大小也比非本地编译大。
但是当我跑步时
rebar eunit
测试我的模块我总是会为
code:is_module_native(?MODULE)
在我的被测模块中
为什么钢筋无法将eunit测试作为本机代码运行?
我还将此行添加到reltool.config文件中,
{app, hipe, [{incl_cond, include}]},
钢筋2.1.0-pre 17 20140421_192321 git 2.1.0-pre-166-ged88055
使用以下命令定义的编译选项运行“钢筋eunit”时,将重新编译代码:
{erl_opts, [native, {hipe, [verbose]}, warnings_as_errors, debug_info]}.
并通过定义的编译选项进行修改
{eunit_compile_opts, [???]}.
您检查了这些选项吗?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.