From 064399e6f1127bac01b663fe165f3bcd94df3cd7 Mon Sep 17 00:00:00 2001 From: Johannes Schmidt Date: Tue, 22 Apr 2025 12:18:34 +0200 Subject: [PATCH] Rephrase some sentences about unity builds in dev docs We didn't really 'invent' unity builds, more like adopted them, since this is a common practice. Also added a reference to the actual CMake variable in question instead of just alluding to it --- doc/21-development.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/doc/21-development.md b/doc/21-development.md index 8c57e7074..bf458cfb2 100644 --- a/doc/21-development.md +++ b/doc/21-development.md @@ -792,17 +792,18 @@ The most common benefits: #### Unity Builds -Another thing you should be aware of: Unity builds on and off. +You should be aware that by default unity builds are enabled. You can turn them +off by setting the `ICINGA2_UNITY_BUILD` CMake option to `OFF`. Typically, we already use caching mechanisms to reduce recompile time with ccache. For release builds, there's always a new build needed as the difference is huge compared to a previous (major) release. -Therefore we've invented the Unity builds, which basically concatenates all source files -into one big library source code file. The compiler then doesn't need to load the many small -files but compiles and links this huge one. +Unity builds basically concatenate all source files into one big library source code file. +The compiler then doesn't need to load many small files, each with all of their includes, +but compiles and links only a few huge ones. -Unity builds require more memory which is why you should disable them for development +However, unity builds require more memory which is why you should disable them for development builds in small sized VMs (Linux, Windows) and also Docker containers. There's a couple of header files which are included everywhere. If you touch/edit them,