Skip to content

Commit f8d3b49

Browse files
committed
[distcc] When distcc is enabled force cmake to use localhost for configure testing.
It seems that distcc --randomize is causing cmake to invoke configuration commands on remote machines. This is slow. Instead, just use the localhost host when running cmake. The rest of the build is distributed as normal.
1 parent 122350d commit f8d3b49

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

utils/build-script-impl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1884,7 +1884,10 @@ for deployment_target in "${HOST_TARGET}" "${CROSS_COMPILE_TOOLS_DEPLOYMENT_TARG
18841884
( ! -z "${generator_output_path}" && ! -f "${generator_output_path}" ) ]] ; then
18851885
set -x
18861886
mkdir -p "${build_dir}"
1887-
(cd "${build_dir}" && "${CMAKE}" "${cmake_options[@]}" "${EXTRA_CMAKE_OPTIONS[@]}" "${source_dir}")
1887+
if [[ -n "${DISTCC}" ]]; then
1888+
EXTRA_DISTCC_OPTIONS="DISTCC_HOSTS=localhost,lzo,cpp"
1889+
fi
1890+
(cd "${build_dir}" && env "${EXTRA_DISTCC_OPTIONS}" "${CMAKE}" "${cmake_options[@]}" "${EXTRA_CMAKE_OPTIONS[@]}" "${source_dir}")
18881891
{ set +x; } 2>/dev/null
18891892
fi
18901893

0 commit comments

Comments
 (0)