scan-build error

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

scan-build error

Vassil Vassilev via cfe-dev
hi,
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>.
Is there any difference between those two build command? And how to build successfully with scan-build a build.sh?
Thanks.

_______________________________________________
cfe-dev mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: scan-build error

Vassil Vassilev via cfe-dev
Hi,

Essentially, scan-build is a fairly lightweight script.  Xcode is supported with a simple pattern matching of a command that is run via scan-build.
  if ($Cmd =~ /\bxcodebuild$/) {
    return RunXcodebuild($Args, $IgnoreErrors, $CCAnalyzer, $CXXAnalyzer, $EnvVars);
  }
So, in your particular case, the only way to do it with a script is to call scan-build within this script as well.

On 15 Jun 2020, at 11:26, 1789955632 via cfe-dev <[hidden email]> wrote:

hi,
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>.
Is there any difference between those two build command? And how to build successfully with scan-build a build.sh?
Thanks.
_______________________________________________
cfe-dev mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev


_______________________________________________
cfe-dev mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: scan-build error

Vassil Vassilev via cfe-dev
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.

But generally, yeah, scan-build has explicit support for xcodebuild but it can't work unless scan-build is to invoke xcodebuild directly.

On 6/15/20 1:35 PM, Valeriy Savchenko via cfe-dev wrote:
Hi,

Essentially, scan-build is a fairly lightweight script.  Xcode is supported with a simple pattern matching of a command that is run via scan-build.
  if ($Cmd =~ /\bxcodebuild$/) {
    return RunXcodebuild($Args, $IgnoreErrors, $CCAnalyzer, $CXXAnalyzer, $EnvVars);
  }
So, in your particular case, the only way to do it with a script is to call scan-build within this script as well.

On 15 Jun 2020, at 11:26, 1789955632 via cfe-dev <[hidden email]> wrote:

hi,
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>.
Is there any difference between those two build command? And how to build successfully with scan-build a build.sh?
Thanks.
_______________________________________________
cfe-dev mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev


_______________________________________________
cfe-dev mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev


_______________________________________________
cfe-dev mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev