Compile attribute and module_info
Roberto Aloi <[email protected]>
| Newsgroups | gmane.comp.lang.erlang.bugs |
|---|---|
| Message-ID | <CAB=dftqqVgL_Lj-9OZf0ZBUZeZBUcH3uU2L1QEPcBFzW+zh5bg@mail.gmail.com> |
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
_______________________________________________
erlang-bugs mailing list
[email protected]
http://erlang.org/mailman/listinfo/erlang-bugs