作者:留难龚_431 | 来源:互联网 | 2023-05-19 15:05
IhavecompiledmyErlangmoduleusing我使用了编译我的Erlang模块rebarcompileusingthefollowingoption
I have compiled my Erlang module using
我使用了编译我的Erlang模块
rebar compile
using the following option in rebar.config
在rebar.config中使用以下选项
{erl_opts, [native, {hipe, [verbose]}, warnings_as_errors, debug_info]}.
{eunit_compile_opts, [native, {hipe, [verbose]}, warnings_as_errors, debug_info]}.
I see that the code is indeed compiled to native since I see Hipe messages during compilation and the .beam file size are also larger than non-native compilation.
我看到代码确实编译为native,因为我在编译期间看到Hipe消息,而.beam文件大小也比非本机编译大。
However when I run
但是,当我跑
rebar eunit
which tests my module I always get false for
哪个测试我的模块我总是假的
code:is_module_native(?MODULE)
within my module under test.
在我的测试模块中。
Why does rebar not run my eunit test as native code?
为什么rebar不能作为本机代码运行我的eunit测试?
I have additionally added this line to the reltool.config file,
我还在reltool.config文件中添加了这一行,
{app, hipe, [{incl_cond, include}]},
rebar 2.1.0-pre 17 20140421_192321 git 2.1.0-pre-166-ged88055
螺纹钢2.1.0-pre 17 20140421_192321 git 2.1.0-pre-166-ged88055
1 个解决方案