Skip to content

Commit 479a148

Browse files
committed
[build-toolchain] Add the ability to specify a prefix to prepend to the specific toolchain preset invoked.
1 parent cf7c237 commit 479a148

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
@@ -32,6 +32,9 @@ function usage() {
3232
echo "--preset-file"
3333
echo "load build-script presets from the specified file"
3434
echo ""
35+
echo "--preset-prefix"
36+
echo "Customize the preset invoked by prepending a prefix"
37+
echo ""
3538
}
3639

3740
RESULT_DIR=$PWD
@@ -42,6 +45,7 @@ DISTCC_FLAG=
4245
DRY_RUN=
4346
BUNDLE_PREFIX=
4447
PRESET_FILE_FLAGS=
48+
PRESET_PREFIX=
4549
case $(uname -s) in
4650
Darwin)
4751
SWIFT_PACKAGE=buildbot_osx_package,no_test
@@ -77,6 +81,10 @@ while [ $# -ne 0 ]; do
7781
--preset-file)
7882
shift
7983
PRESET_FILE_FLAGS="${PRESET_FILE_FLAGS} --preset-file=$1"
84+
;;
85+
--preset-prefix)
86+
shift
87+
PRESET_PREFIX="$1"
8088
;;
8189
-h|--help)
8290
usage
@@ -125,7 +133,7 @@ DRY_RUN="${DRY_RUN}"
125133
DISTCC_FLAG="${DISTCC_FLAG}"
126134
PRESET_FILE_FLAGS="${PRESET_FILE_FLAGS}"
127135

128-
./utils/build-script ${DRY_RUN} ${DISTCC_FLAG} ${PRESET_FILE_FLAGS} --preset="${SWIFT_PACKAGE}" \
136+
./utils/build-script ${DRY_RUN} ${DISTCC_FLAG} ${PRESET_FILE_FLAGS} --preset="${PRESET_PREFIX}${SWIFT_PACKAGE}" \
129137
install_destdir="${SWIFT_INSTALL_DIR}" \
130138
installable_package="${SWIFT_INSTALLABLE_PACKAGE}" \
131139
install_toolchain_dir="${SWIFT_TOOLCHAIN_DIR}" \

0 commit comments

Comments
 (0)