To analyze files with Infer you can use the compilers javac and clang. You can also use Infer with gcc, however, internally Infer will use clang to compile your code. So, it may not work if your code does not compile with clang.

Moreover, you can run Infer with a variety of build systems. Notice that you can run infer faster by running the compilation command in parallel, e.g. infer run -- make -j8. Please also take into account that if you wish to analyze a project, you should probably do clean beforehand so that the compiler compiles all the files and so Infer also analyses all the files (see the previous section).

Here is an overview of the build systems supported by Infer. You can get more information about how a particular build system is supported by looking at the SYNOPSIS section of the infer-capture manual: infer capture --help.


infer run -- gradle <gradle task, e.g. "build">
infer run -- ./gradlew <gradle task, e.g. "build">


infer run -- buck <buck target>


infer run -- mvn <maven target>


Infer can analyze apps built using xcodebuild. For instance, for an iOS app:

infer run -- xcodebuild -target <target name> -configuration <build configuration> -sdk iphonesimulator


Infer can analyze projects that compile with make. If there are C++ files in the project, they will be ignored.

infer run -- make <make target>

Edit on GitHub