<div dir="ltr">Thank you very much, Devin. You are right: using make -jN does make static analyzer to run in parallel too. -Eric<br><div class="gmail_extra"><br><div class="gmail_quote">Devin Coughlin <span dir="ltr"><<a href="mailto:dcoughlin@apple.com" target="_blank">dcoughlin@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
> E Feng via cfe-dev <<a href="mailto:cfe-dev@lists.llvm.org">cfe-dev@lists.llvm.org</a>> wrote:<br>
><br>
> I understand the "make -j10" makes the build phase parallel. However, how do I make the static analysis/html report generation phase parallel as well? Is there such an option in scan-build to do that? I searched the scan-build documentation but could not find such an option. It seems by default, scan-build performs static analysis/html report generation phase in serial mode.<br>
<br>
</span>Using make -jN is enough to cause the static analyzer to run in parallel as well. This is because scan-build uses environment variable interposition to replace CC with its own script that pretends to be the compiler. The script first builds each source file with the real compiler and then immediately analyzes it. This means that if ‘make' calls the compiler in parallel on a given set of translation units (which it does with -jN) then the static analyzer will also analyze those translation units in parallel.<br>
<br>
For example, when using scan-build to analyze openssl-1.0.0d with ‘make -j10’ I see between 4 and 11 analysis processes running concurrently with ‘ps’.<br>
<span class="HOEnZb"><font color="#888888"><br>
Devin<br>
<br>
<br>
</font></span></blockquote></div><br></div></div>