我使用以下命令编译我的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对我的模块进行测试,我总是得到false
code:is_module_native(?MODULE)在我测试的模块中。
为什么rebar不能将我的eunit测试作为本机代码运行?
我还将这一行添加到reltool.config文件中,
{app, hipe, [{incl_cond, include}]},rebar 2.1.0-高级版17 20140421_192321 git 2.1.0-高级版166-GED88055
发布于 2015-05-13 00:06:24
定义的编译选项运行"rebar eunit“时,将重新编译代码
{erl_opts, [native, {hipe, [verbose]}, warnings_as_errors, debug_info]}.定义的编译选项进行修改。
{eunit_compile_opts, [???]}.你检查这些选项了吗?
https://stackoverflow.com/questions/30181147
复制相似问题