<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html;
      charset=windows-1252">
  </head>
  <body>
    Another thing you could try is to turn your Xcode project inside out
    by running the shell script from inside the Xcode project (as a "Run
    Script Phase") instead of running xcodebuild from inside the shell
    script.<br>
    <br>
    But generally, yeah, scan-build has explicit support for xcodebuild
    but it can't work unless scan-build is to invoke xcodebuild
    directly.<br>
    <br>
    <div class="moz-cite-prefix">On 6/15/20 1:35 PM, Valeriy Savchenko
      via cfe-dev wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:92D29432-4578-4878-80C2-11CFED928812@apple.com">
      <meta http-equiv="content-type" content="text/html;
        charset=windows-1252">
      <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=""
          moz-do-not-send="true">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=""
          moz-do-not-send="true">cfe-dev@lists.llvm.org</a><br class="">
        <a class="moz-txt-link-freetext" href="https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev">https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a><br
          class="">
      </blockquote>
      <br class="">
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
cfe-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:cfe-dev@lists.llvm.org">cfe-dev@lists.llvm.org</a>
<a class="moz-txt-link-freetext" href="https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev">https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>