Unpacking the Build Process: Part 2
Part 2 looks at the core of the build process, turning the source into compiled code. In Serpent OS this is handled by our build tool boulder. It is usually the part of the build that takes the longest, so where speed ups have the most impact. How long it takes is largely down to the performance of your compiler and what compile flags you are building with.
This post follows on from Unpacking the Build Process: Part 1.
Turning Source into Compiled Code
Section titled “Turning Source into Compiled Code”The steps for compiling code are generally quite straight-forward:
- Setting up the build (cmake, configure, meson)
- Compiling the source (in parallel threads)
- Installing the build into a package directory
This will build software compiled against packages installed on your system. It’s a bit more complicated when packaging as we first set up an environment to compile in (Part 1). But even then you have many choices to make and each can have an impact on how long it takes to compile the code. Do you build with Link Time Optimizations (LTO) or Profile Guided Optimizations (PGO), do you build the package for performance or for the smallest size? Then there’s packages that benefit considerably from individual tuning flags (like -fno-semantic-interposition with python). With so many possibilities, boulder helps us utilize them through convenient configuration options.

