[llvmlinux] [GSoC] Static analysis
e.bachmakov at gmail.com
Mon Apr 29 18:22:13 UTC 2013
On Sun, Apr 28, 2013 at 10:49 AM, Mark Charlebois <charlebm at gmail.com>wrote:
> The build system tries to keep as much common as possible while allowing
> you to do the following:
> - add new targets
> - write common rules of targets of the same architecture
> - write patches that are common, arch specific or target specific, or git
> branch specific (for particular kernel versions as some targets do not
> tract the upstream trunk)
> - support multiple cross toolchains to validate using clang with
> particular assemblers and linkers
> - switching the toolchain to use with clang is as simple as changing a
> line in the target makefile
> - provide easy commands to do common tasks: syncing, building at target or
> rebuilding clang, etc
So if I understand this right, the system is a set of hand-written
Makefiles (as opposed to systems like cmake or autotools)?
> cd llvmlinux
> make build-dep-check
> -- install anything missing --
> cd target/vexpress
> make kernel-build
I was able to x64 just fine the other day. (I also tried it with
allyesconfig but that (obviously) failed).
Quick question though, why is vexpress always used as an example (buildbot,
wiki, etc)? Is there something special about it or "just because"?
> This will download LLVM and clang and build them, download the cross
> compiler toolchains specified in the vexpress Makefile, download the
> kernel, and then build the kernel, apply the patches to the kernel and
> build the kernel with clang.
> The build system tracks all of the dependencies in state subdirectories.
> When you clean a particular make target it will clean out the files from
> the associated state directory.
About the state directories: I noticed the files are empty. I assume you're
testing for state using test -f like methods?
As far as the scope for implementing checker for the kernel, many of the
> frequent contributors just have not had the time to try it. From those who
> have tried it, we know it doesn't just work out of the box.
I see. When ever I used the analyzer it was using the scan-build tool. Need
to check whether it works with the custom build system
> Its an advanced task because the kernel make system is complcated, and it
> may require modifying LLVM or checker code. We just don't know yet.
Alright. My plan was to read up on the whole kbuild system and see how
flags/commands enabling the analyzer would be integrated.
> Thanks for your interest in the project!
Let's hope I can help :-).
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the LLVMLinux