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
45
45
46
46
# Set defaults
47
47
DISTCC_FLAG=
48
+ SCCACHE_FLAG=
48
49
DRY_RUN=
49
50
BUNDLE_PREFIX=
50
51
PRESET_FILE_FLAGS=
@@ -82,6 +83,15 @@ while [ $# -ne 0 ]; do
82
83
;;
83
84
--distcc)
84
85
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} "
85
95
;;
86
96
--preset-file)
87
97
shift
@@ -140,8 +150,10 @@ SYMBOLS_PACKAGE="${RESULT_DIR}/${SYM_ARCHIVE}"
140
150
DRY_RUN=" ${DRY_RUN} "
141
151
DISTCC_FLAG=" ${DISTCC_FLAG} "
142
152
PRESET_FILE_FLAGS=" ${PRESET_FILE_FLAGS} "
153
+ SCCACHE_FLAG=" ${SCCACHE_FLAG} "
143
154
144
155
./utils/build-script ${DRY_RUN} ${DISTCC_FLAG} ${PRESET_FILE_FLAGS} \
156
+ ${SCCACHE_FLAG} \
145
157
--preset=" ${PRESET_PREFIX}${SWIFT_PACKAGE}${PRESET_SUFFIX} " \
146
158
install_destdir=" ${SWIFT_INSTALL_DIR} " \
147
159
installable_package=" ${SWIFT_INSTALLABLE_PACKAGE} " \
You can’t perform that action at this time.
0 commit comments