[cfe-dev] speed up clang build after modifying checker code of static analyzer
Stephen Kelly via cfe-dev
cfe-dev at lists.llvm.org
Wed Sep 19 13:02:44 PDT 2018
On 19/09/18 03:06, Lou Wynn via cfe-dev wrote:
> I do need debug information because tracing code is a great way for me
> to get familiarized with clang and the static analyzer.
>
> I've managed to run "make -j8 clang" at the top of the build directory.
> However, the final linking process takes too long now. Is there a way to
> build a thin version that only runs the static analyzer? I think that I
> can at least cut the code gen part out of the build process but have no
> idea how. The only command I run is "clang -cc1 -analyze
> -analyzer-checker=xxx" It'd be great if I could reduce the final object
> file to few hundred megabytes.
You can run cmake with -DLLVM_BUILD_TARGETS=X86 or even
-DLLVM_BUILD_TARGETS="". You won't be able to generate machine code, but
it should work.
You can also pass -DLLVM_INCLUDE_TESTS=OFF if you want a smaller
buildsystem.
Also make sure you are not building other repos such as
clang-tools-extra.
Thanks,
Stephen.
More information about the cfe-dev
mailing list