mumble: Add build option CMAKE_UNITY_BUILD for compilation speed
This provides a significant speed boost to the compilation. Almost 70% improvement in my experiments. # plain build ❯ nx hyperfine 'nix build .#mumble --rebuild' --warmup 1 --ignore-failure Benchmark 1: nix build .#mumble --rebuild Time (mean ± σ): 73.287 s ± 2.462 s [User: 0.679 s, System: 3.338 s] Range (min … max): 69.478 s … 77.686 s 10 runs # unity build ❯ nx hyperfine 'nix build .#mumble --rebuild' --warmup 1 --ignore-failure Benchmark 1: nix build .#mumble --rebuild Time (mean ± σ): 42.713 s ± 1.435 s [User: 0.089 s, System: 1.216 s] Range (min … max): 39.891 s … 44.800 s 10 runs
This commit is contained in:
committed by
Martin Häcker
parent
bf8fe59e58
commit
471c0b53d2
@@ -72,6 +72,7 @@ let
|
||||
"-D g15=OFF"
|
||||
"-D CMAKE_CXX_STANDARD=17" # protobuf >22 requires C++ 17
|
||||
"-D BUILD_NUMBER=${lib.versions.patch source.version}"
|
||||
"-D CMAKE_UNITY_BUILD=ON" # Upstream uses this in their build pipeline to speed up builds
|
||||
"-D bundled-gsl=OFF"
|
||||
"-D bundled-json=OFF"
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user