Skip to content

Commit cf7c237

Browse files
committed
[build-toolchain] Add support for specifying a preset file.
1 parent 17e70c8 commit cf7c237

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

utils/build-toolchain

+10-1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ function usage() {
2929
echo "--distcc"
3030
echo "Build with distcc to speed up the toolchain build"
3131
echo ""
32+
echo "--preset-file"
33+
echo "load build-script presets from the specified file"
34+
echo ""
3235
}
3336

3437
RESULT_DIR=$PWD
@@ -38,6 +41,7 @@ cd "$(dirname $0)/.." || exit
3841
DISTCC_FLAG=
3942
DRY_RUN=
4043
BUNDLE_PREFIX=
44+
PRESET_FILE_FLAGS=
4145
case $(uname -s) in
4246
Darwin)
4347
SWIFT_PACKAGE=buildbot_osx_package,no_test
@@ -69,6 +73,10 @@ while [ $# -ne 0 ]; do
6973
;;
7074
--distcc)
7175
DISTCC_FLAG="--distcc"
76+
;;
77+
--preset-file)
78+
shift
79+
PRESET_FILE_FLAGS="${PRESET_FILE_FLAGS} --preset-file=$1"
7280
;;
7381
-h|--help)
7482
usage
@@ -115,8 +123,9 @@ SWIFT_TOOLCHAIN_DIR="/Library/Developer/Toolchains/${TOOLCHAIN_NAME}.xctoolchain
115123
SYMBOLS_PACKAGE="${RESULT_DIR}/${SYM_ARCHIVE}"
116124
DRY_RUN="${DRY_RUN}"
117125
DISTCC_FLAG="${DISTCC_FLAG}"
126+
PRESET_FILE_FLAGS="${PRESET_FILE_FLAGS}"
118127

119-
./utils/build-script ${DRY_RUN} ${DISTCC_FLAG} --preset="${SWIFT_PACKAGE}" \
128+
./utils/build-script ${DRY_RUN} ${DISTCC_FLAG} ${PRESET_FILE_FLAGS} --preset="${SWIFT_PACKAGE}" \
120129
install_destdir="${SWIFT_INSTALL_DIR}" \
121130
installable_package="${SWIFT_INSTALLABLE_PACKAGE}" \
122131
install_toolchain_dir="${SWIFT_TOOLCHAIN_DIR}" \

0 commit comments

Comments
 (0)