[erlang-bugs] Compile attribute and module_info
Roberto Aloi
prof3ta@REDACTED
Mon Mar 23 15:32:45 CET 2015
Hi,
given the following module test.erl:
-module(test).
-export([test/0]).
test() -> ok.
if I compile it with the 'native' option, I can see the option in the list
of compile
options returned by test:module_info/0:
1> c(test, [native]).
{ok,test}
2> test:module_info().
[{exports,[{test,0},{module_info,0},{module_info,1}]},
{imports,[]},
{attributes,[{vsn,[...]}]},
{compile,[{options,[native]},
{version,"4.9.4"},
{time,{2015,3,23,14,26,9}},
{source,"/tmp/test.erl"}]}]
But if I use the 'native compile attribute, instead:
-module(test).
-compile([native]).
-export([test/0]).
test() -> ok.
If I compile the module, the option is not returned by test:module_info/0,
either as a compile option or as an attribute:
3> c(test).
{ok,test}
4> test:module_info().
[{exports,[{test,0},{module_info,0},{module_info,1}]},
{imports,[]},
{attributes,[{vsn,[...]}]},
{compile,[{options,[]},
{version,"4.9.4"},
{time,{2015,3,23,14,28,28}},
{source,"/tmp/test.erl"}]}]
Is this the intended behaviour?
R
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-bugs/attachments/20150323/51efb410/attachment.htm>
More information about the erlang-bugs
mailing list