[scan-build] [Patch] Compiler call interceptor for Linux
Jordan Rose
jordan_rose at apple.com
Tue May 13 09:01:43 PDT 2014
[+cfe-commits again, -cfe-dev]
Interested yes, but unfortunately not all of the people involved in the analyzer are using Linux systems. (I'm on OS X.) I've CC'd a few other recent contributors to the analyzer, but I can't remember if they are familiar with and have access to Linux systems either. (Laszlo in particular is attempting to rewrite scan-build in Python, for more uniformity with the rest of LLVM, so this is the sort of thing he'd want to stay up-to-date about.)
Sorry for not being so responsive here,
Jordan
On May 13, 2014, at 8:47 , Aleksei Sidorin <a.sidorin at samsung.com> wrote:
> Hello again,
>
> I sent a message to cfe-commits mailing list, but nobody answered. This task is listed in open projects. Is anybody interested in this interceptor?
>
> Link to review: http://reviews.llvm.org/D3608
>
> 29.04.2014 09:38, Aleksei Sidorin:
>> Hello,
>>
>> This patch enables interception of compiler calls without replacement of environment variables. It uses strace (v.4.8) to compute root directory of processes (in case of chroot), working directory, process name and its environment variables and tries to guess some header directories. This approach works well with Android and some build systems like OBS (local build with osc client) and GBS (checked on Tizen). This behaviour can be enabled with --use-interceptor option. If this option is not specified, old behaviour is used (this patch was made to not break it).
>>
>> Interceptor uses process pool to analyze multiple files at a time. Pool size can be specified with NUM_PROCESSES environment variable. Default pool size is a number of processors.
>>
>> If we have a trace of build (that may be created with `strace -f -v -s 1000000 -o $trace_file_name -e trace=vfork,fork,clone,execve,chdir,chroot -e signal= $build_cmd`), it can be passed via TRACE_FILE environment variable. This will not launch parallel build (analysis only). If option is not specified, temporary pipe is used, analyzer and compiler are executed in parallel.
>>
>> -additional-arg option was also added to pass additional parameters to analyzer. Sometimes scan-build cannot determine all required parameters if some custom toolchain is used.
>>
>> Interceptor was tested on Ubuntu 12.04 and 14.04 with strace 4.8. Strace v.4.6 is known to have some issues with interception of gcc.
>>
>
>
> --
> Best regards,
> Aleksei Sidorin
> Software Engineer,
> IMSWL-IMCG, SRR, Samsung Electronics
>
More information about the cfe-commits
mailing list