1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-08-08 14:22:09 +03:00

Much more cmake processes when sccache is enabled (because build becomes IO bound task)

This commit is contained in:
Alexander Presnyakov
2025-04-30 03:06:33 +00:00
parent 07de09bd66
commit 198054bda4
2 changed files with 10 additions and 1 deletions

View File

@@ -317,6 +317,11 @@ construct_cmake_flags() {
if [[ $SCCACHE = true ]]; then
warn "Use sccache"
# If sccache works well, the build becomes an IO bound task instead of CPU bound
# It happens because most of the time is spent is hashing the input files
# So we can run more jobs in parallel
CPUS=$((CPUS * 3))
message "Adjusted the number of CPUs for parallel build to $CPUS (multiplied by 3 to reduce IO wait)"
MDB_CMAKE_FLAGS="${MDB_CMAKE_FLAGS} -DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache"
fi