Last weekend, I finished upgrading our Linux and OS X debug and opt static
analysis builds ("S" jobs on TreeHerder) to the latest revision of clang
3.7.

Now, if you use the latest version of clang (3.7, which is available from <
http://llvm.org/releases/download.html#3.7.0> in binary form), you can turn
on static analysis checks locally by adding the following line to your
mozconfig:

ac_add_options --enable-clang-plugin

Doing this helps you in detecting errors specific to the "S" jobs early
during development, which simplifies the process of landing patches by
letting you see the errors at the same time as other compiler errors.

On Linux, most other recent versions of clang should work too, such as the
one you usually get from your distro, provided that the dev package for
LLVM/Clang has been installed.  On OSX, the default clang that ships with
recent versions of XCode lacks the dev headers and tools so it can't be
used, but the llvm.org clang binaries should work well.

I have been running this plugin locally in all of my builds for several
months now and once you migrate to this setup, everything should proceed
hassle free.  If you find issues getting your particular clang setup to
work with the plugin, please let me know, and I will help fix them.  I'd
like to eventually get us to a point where these checks are turned on by
default during local builds.

Thanks,
-- 
Ehsan
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to