<div dir="ltr"><div class="gmail_signature">Hi,</div><div class="gmail_signature"><br></div><div class="gmail_signature">given the following module test.erl:</div><div class="gmail_signature"><br></div><div class="gmail_signature"><div class="gmail_signature">-module(test).</div><div class="gmail_signature">-export([test/0]).</div><div class="gmail_signature">test() -> ok.</div><div><br></div></div><div class="gmail_signature">if I compile it with the 'native' option, I can see the option in the list of compile</div><div class="gmail_signature">options returned by test:module_info/0:</div><div class="gmail_signature"><br></div><div class="gmail_signature"><div class="gmail_signature">1> c(test, [native]).</div><div class="gmail_signature">{ok,test}</div><div class="gmail_signature">2> test:module_info().</div><div class="gmail_signature">[{exports,[{test,0},{module_info,0},{module_info,1}]},</div><div class="gmail_signature"> {imports,[]},</div><div class="gmail_signature"> {attributes,[{vsn,[...]}]},</div><div class="gmail_signature"> {compile,[{options,[native]},</div><div class="gmail_signature"> {version,"4.9.4"},</div><div class="gmail_signature"> {time,{2015,3,23,14,26,9}},</div><div class="gmail_signature"> {source,"/tmp/test.erl"}]}]</div><div><br></div><div>But if I use the 'native compile attribute, instead:</div><div><br></div><div><div class="gmail_signature">-module(test).</div><div class="gmail_signature">-compile([native]).</div><div class="gmail_signature">-export([test/0]).</div><div class="gmail_signature">test() -> ok.</div></div><div><br></div><div>If I compile the module, the option is not returned by test:module_info/0, either as a compile option or as an attribute:</div><div><br></div><div><div>3> c(test).</div><div>{ok,test}</div><div>4> test:module_info().</div><div>[{exports,[{test,0},{module_info,0},{module_info,1}]},</div><div> {imports,[]},</div><div> {attributes,[{vsn,[...]}]},</div><div> {compile,[{options,[]},</div><div> {version,"4.9.4"},</div><div> {time,{2015,3,23,14,28,28}},</div><div> {source,"/tmp/test.erl"}]}]</div></div><div><br></div><div>Is this the intended behaviour?</div><div><br></div><div>R</div><div><br></div></div>
</div>