<div dir="ltr">You can use -mllvm -opt-bisect-limit=<limit> to bisect where the error occurs. More documentation here <a href="http://llvm.org/docs/OptBisect.html">http://llvm.org/docs/OptBisect.html</a></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature">~Craig</div></div>
<br><div class="gmail_quote">On Thu, Jul 6, 2017 at 11:18 PM, ROHIT KUMAR via cfe-dev <span dir="ltr"><<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><div dir="ltr">Hey, <div><br></div><div>Context: Android native code built with clang using Android Studio.</div><div><br></div><div>We have been using GCC(Eclipse) for quite a while, now we are trying to move our huge code base to clang (to AndroidStudio). </div><div><br></div><div>With GCC we were using -O3 optimization and everything was working fine, but with clang, even -O1 is causing Android apps to crash on runtime with the seg fault. </div><div><br></div><div>Since apps are working fine when compiled with -O0, so my guess is some kind of optimization is not supported for our code base which is/are introduced by O1/2/3 flags.</div><div><br></div><div>Is there a way I can disable the flags introduced by -O1 one-by-one to figure out the culprit flag(s)?</div><div><br></div><div>Can anyone suggest me such flags to disable optimizations one-by-one? I tried googling but could not find much help.</div><div><br></div><div>I am stuck on this issue for quite a while now. I would really appreciate the help. I am looking for a more general advice on flags to disable optimizations one-by-one with -O1, because making changes in the code base would not be possible. </div><div><br></div><div>Thanks. </div><span class="HOEnZb"><font color="#888888"><span class="m_-5461712951921029681HOEnZb"><font color="#888888"><div>Rohit Kumar</div><div><br></div></font></span></font></span></div>
</div><br></div>
<br>______________________________<wbr>_________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@lists.llvm.org">cfe-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/cfe-dev</a><br>
<br></blockquote></div><br></div>