<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><span class="">Hi,</span><span class=""><br class=""></span><span class=""><br class=""></span><span class="">Essentially, scan-build is a fairly lightweight script. Xcode is supported</span><span class=""> with a simple pattern matching of a command that is run via scan-build.</span><span class=""><br class=""></span><span class=""></span><span class=""></span><span class=""></span><div class=""><pre style="color: rgb(0, 0, 32); background-color: rgb(246, 248, 255);" class=""> <span style="color: rgb(32, 0, 128); font-weight: bold;" class="">if</span> <span style="color: rgb(48, 128, 128);" class="">(</span>$Cmd <span style="color: rgb(48, 128, 128);" class="">=</span><span style="color: rgb(48, 128, 128);" class="">~</span> <span style="color: rgb(48, 128, 128);" class="">/</span>\bxcodebuild$<span style="color: rgb(48, 128, 128);" class="">/</span><span style="color: rgb(48, 128, 128);" class="">)</span> <span style="color: rgb(64, 96, 128);" class="">{</span>
<span style="color: rgb(32, 0, 128); font-weight: bold;" class="">return</span> RunXcodebuild<span style="color: rgb(48, 128, 128);" class="">(</span>$Args<span style="color: rgb(48, 128, 128);" class="">,</span> $IgnoreErrors<span style="color: rgb(48, 128, 128);" class="">,</span> $CCAnalyzer<span style="color: rgb(48, 128, 128);" class="">,</span> $CXXAnalyzer<span style="color: rgb(48, 128, 128);" class="">,</span> $EnvVars<span style="color: rgb(48, 128, 128);" class="">)</span><span style="color: rgb(64, 96, 128);" class="">;</span>
<span style="color: rgb(64, 96, 128);" class="">}</span></pre><div class="">So, in your particular case, the only way to do it with a script is to call scan-build within this script as well.</div><br class=""></div><blockquote type="cite" class="">On 15 Jun 2020, at 11:26, 1789955632 via cfe-dev <<a href="mailto:cfe-dev@lists.llvm.org" class="">cfe-dev@lists.llvm.org</a>> wrote:<br class=""><br class="">hi,<br class="">I'm using scan-build to build OC projects, when the command is "scan-build xcodebuild -target ... ", it works and bugs found. But "scan-build build.sh" (build.sh contents 'xcodebuild -target ...') throws error with <all-product-headers.yaml: error>.<br class="">Is there any difference between those two build command? And how to build successfully with scan-build a build.sh?<br class="">Thanks.<br class="">_______________________________________________<br class="">cfe-dev mailing list<br class=""><a href="mailto:cfe-dev@lists.llvm.org" class="">cfe-dev@lists.llvm.org</a><br class="">https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev<br class=""></blockquote><br class=""></body></html>