C++ Compiler now Open Source to Speed-Up Compile Time

0
5585

A LLVM/Clang-based C++ compiler which employs caching and other techniques in an effort to speed up compile times

To speed up compile times while being a drop-in replacement to GCC (Gnu Compiler Collection) or Clang, Zapcc C++ compiler has been open sourced. According to Zapcc the compiler offers improvements in both incremental and full builds compared to building with Clang 4.0 and Clang 5.0 that is based on heavily modified code from the clang compiler project.

Ignores precompiled headers

The compiler makes practical use of an in-memory compilation cache in a client-server architecture where all the compilation information is recalled between runs.

It’s applications are in an existing build and avoids precompiled headers, an approach that requires a project to be built to specific headers rules. Precompiled headers also do not cache to the same extent as Zapcc. C++ modules are not standard, are hardly used and do not support legacy code or C++ macros well.

C++ modules also require refactoring or they are slow. CC is a catching C++ compiler based on a fork of Clang/LLVM that claims to be up to 50 times faster on recompilations and 2 to 5 times faster on full builds.

Compatibility

The core idea behind Zapcc compilation speedup is using a compilation server, which stays in memory and receives compiled commands from the clients. Zapccs parses C++ header files just once and keeps in memory both all template instantiations and generated code.

It is compatible with the Gnu Compiler Collection (GCC) to the extent that Clang is GCC-compatible. The command syntax is similar to Clang as well, with the command being zapcc. It supports only Linux x64 and experimental support is offered for Windows x64 with mingw-w64 which provides GCC for Windows.

LEAVE A REPLY

Please enter your comment!
Please enter your name here