Lines Matching +full:clang +full:- +full:build

1 scan-build
4 A package designed to wrap a build so that all calls to gcc/clang are
6 the clang static analyzer. Includes intercept-build tool, which logs
7 the build, as well as scan-build tool, which logs the build and runs
8 the clang static analyzer on it.
11 -----------
15 - It has been tested on FreeBSD, GNU/Linux and OS X.
16 - Prepared to work on windows, but need help to make it.
20 -------------
26 ----------
28 To run the Clang static analyzer against a project goes like this:
30 $ scan-build <your build command>
34 $ intercept-build <your build command>
36 To run the Clang static analyzer against a project with compilation database
39 $ analyze-build
41 Use `--help` to know more about the commands.
45 -----------------------------------------------------------
49 $ intercept-build <your build command>
51 To run the Clang Static Analyzer against a compilation database
54 $ analyze-build --ctu
56 For CTU analysis an additional (external definition) collection-phase is required.
59 the analysis are kept on the disk in `./ctu-dir`.
62 $ analyze-build --ctu-collect-only
65 $ analyze-build --ctu-analyze-only
67 Use `--help` to get more information about the commands.
71 -----------
73 Generally speaking, the `intercept-build` and `analyze-build` tools together
74 does the same job as `scan-build` does. So, you can expect the same output
75 from this line as simple `scan-build` would do:
77 $ intercept-build <your build command> && analyze-build
79 The major difference is how and when the analyzer is run. The `scan-build`
84 This is the default behaviour, can be enforced with `--override-compiler`
87 2. Use special library to intercept compiler calls during the build process.
88 The analyzer run against each modules after the build finished.
89 Use `--intercept-first` flag to get this model.
91 3. Use compiler wrappers to intercept compiler calls during the build process.
92 The analyzer run against each modules after the build finished.
93 Use `--intercept-first` and `--override-compiler` flags together to get
96 The 1. and 3. are using compiler wrappers, which works only if the build
97 process respects the `CC` and `CXX` environment variables. (Some build
99 you need to pass the compiler wrappers manually. eg.: `intercept-build
100 --override-compiler make CC=intercept-cc CXX=intercept-c++ all` where the
101 original build command would have been `make all` only.)
103 The 1. runs the analyzer right after the real compilation. So, if the build
115 `intercept-build` command uses only the 2. and 3. mode to generate the
116 compilation database. `analyze-build` does only run the analyzer against the
121 --------------
125 variables might not work. (I don't know any build tool which does that, but
130 ---------------
139 -------
141 The project is licensed under Apache-2.0 with LLVM exceptions.
144 [1]: http://clang.llvm.org/docs/JSONCompilationDatabase.html
145 [2]: https://pypi.python.org/pypi/scan-build
146 [3]: https://llvm.org/bugs/enter_bug.cgi?product=clang