【发布时间】:2015-07-22 18:04:18
【问题描述】:
我已经使用
编译了我的 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)
在我的测试模块中。
为什么 rebar 不将我的 eunit 测试作为本机代码运行?
我在 reltool.config 文件中额外添加了这一行,
{app, hipe, [{incl_cond, include}]},
钢筋 2.1.0-pre 17 20140421_192321 git 2.1.0-pre-166-ged88055
【问题讨论】:
标签: erlang rebar erl eunit hipe