File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -45,6 +45,7 @@ cd "$(dirname $0)/.." || exit
4545
4646# Set defaults
4747DISTCC_FLAG=
48+ SCCACHE_FLAG=
4849DRY_RUN=
4950BUNDLE_PREFIX=
5051PRESET_FILE_FLAGS=
@@ -82,6 +83,15 @@ while [ $# -ne 0 ]; do
8283 ;;
8384 --distcc)
8485 DISTCC_FLAG=" --distcc"
86+ ;;
87+ --sccache)
88+ SCCACHE=$( which sccache)
89+ if [[ -z " ${SCCACHE} " ]]; then
90+ echo " Error! Asked to use sccache, but could not find sccache in PATH?!"
91+ usage
92+ exit 1
93+ fi
94+ SCCACHE_FLAG=" --cmake-c-launcher=${SCCACHE} --cmake-cxx-launcher=${SCCACHE} "
8595 ;;
8696 --preset-file)
8797 shift
@@ -140,8 +150,10 @@ SYMBOLS_PACKAGE="${RESULT_DIR}/${SYM_ARCHIVE}"
140150DRY_RUN=" ${DRY_RUN} "
141151DISTCC_FLAG=" ${DISTCC_FLAG} "
142152PRESET_FILE_FLAGS=" ${PRESET_FILE_FLAGS} "
153+ SCCACHE_FLAG=" ${SCCACHE_FLAG} "
143154
144155./utils/build-script ${DRY_RUN} ${DISTCC_FLAG} ${PRESET_FILE_FLAGS} \
156+ ${SCCACHE_FLAG} \
145157 --preset=" ${PRESET_PREFIX}${SWIFT_PACKAGE}${PRESET_SUFFIX} " \
146158 install_destdir=" ${SWIFT_INSTALL_DIR} " \
147159 installable_package=" ${SWIFT_INSTALLABLE_PACKAGE} " \
You can’t perform that action at this time.
0 commit comments