Skip to content

Commit d5c661f

Browse files
authored
Merge pull request #16976 from gottesmm/pr-c0beaa9a1e7fa7e23c1a1ad9262c97c7e8e34810
Teach build-toolchain how to pass distcc down to build-script.
2 parents ebd9cd8 + 971630b commit d5c661f

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

utils/build-toolchain

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,16 @@ function usage() {
2626
echo "-t --test"
2727
echo "Run tests."
2828
echo ""
29+
echo "--distcc"
30+
echo "Build with distcc to speed up the toolchain build"
31+
echo ""
2932
}
3033

3134
cd "$(dirname $0)/.." || exit
3235
SRC_DIR=$PWD
3336

3437
# Set defaults
38+
DISTCC_FLAG=
3539
DRY_RUN=
3640
BUNDLE_PREFIX=
3741
case $(uname -s) in
@@ -60,6 +64,9 @@ while [ $# -ne 0 ]; do
6064
else
6165
SWIFT_PACKAGE=buildbot_osx_package
6266
fi
67+
;;
68+
--distcc)
69+
DISTCC_FLAG="--distcc"
6370
;;
6471
-h|--help)
6572
usage
@@ -104,8 +111,9 @@ SWIFT_INSTALL_SYMROOT="${SRC_DIR}/swift-nightly-symroot"
104111
SWIFT_TOOLCHAIN_DIR="/Library/Developer/Toolchains/${TOOLCHAIN_NAME}.xctoolchain"
105112
SYMBOLS_PACKAGE="${SRC_DIR}/${SYM_ARCHIVE}"
106113
DRY_RUN="${DRY_RUN}"
114+
DISTCC_FLAG="${DISTCC_FLAG}"
107115

108-
./utils/build-script ${DRY_RUN} --preset="${SWIFT_PACKAGE}" \
116+
./utils/build-script ${DRY_RUN} ${DISTCC_FLAG} --preset="${SWIFT_PACKAGE}" \
109117
install_destdir="${SWIFT_INSTALL_DIR}" \
110118
installable_package="${SWIFT_INSTALLABLE_PACKAGE}" \
111119
install_toolchain_dir="${SWIFT_TOOLCHAIN_DIR}" \

0 commit comments

Comments
 (0)