[cfe-dev] Issue #2 with clang-analyzer on RTEMS

Ted Kremenek kremenek at apple.com
Wed Sep 29 09:46:56 PDT 2010


On Sep 25, 2010, at 5:37 PM, Andrew McGregor <andrewmcgr at gmail.com> wrote:

>> I am only using the analyzer.  Not trying to actually compile to
>> machine code.
> 
> You can teach scan-build how to invoke clang for a particular target... it's in perl, which is pretty horrible, but that's where to make the modifications. -isysroot is your friend.

Just to be clear, the main role of scan-build and ccc-analyzer is to interpose on the build and run the analyzer on each file by executing 'clang'.  Information about specific targets, including processing command line options, should be put in clang, not scan-build or ccc-analyzer.  Beyond being the only solution that will likely work in practice, it pays dividends in the future when bringing up the Clang compiler on the same platform.



More information about the cfe-dev mailing list