Skip to content

Commit e1163c0

Browse files
committed
Add -a/--no-asserts option to build a no-asserts (production) toolchain
1 parent 9f2acb2 commit e1163c0

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

utils/build-toolchain

+8-1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ function usage() {
2626
echo "-t --test"
2727
echo "Run tests."
2828
echo ""
29+
echo "-a --no-assert"
30+
echo "No assertions"
31+
echo ""
2932
echo "--distcc"
3033
echo "Build with distcc to speed up the toolchain build"
3134
echo ""
@@ -56,6 +59,7 @@ PRESET_PREFIX=
5659
NO_TEST=",no_test"
5760
USE_OS_RUNTIME=
5861
MACOS_ONLY=
62+
NO_ASSERTIONS=
5963

6064
case $(uname -s) in
6165
Darwin)
@@ -101,6 +105,9 @@ while [ $# -ne 0 ]; do
101105
;;
102106
--macos-only)
103107
MACOS_ONLY=",macos_only"
108+
;;
109+
-a|--no-assert)
110+
NO_ASSERTIONS=",no_assertions"
104111
;;
105112
-h|--help)
106113
usage
@@ -152,7 +159,7 @@ SCCACHE_FLAG="${SCCACHE_FLAG}"
152159

153160
./utils/build-script ${DRY_RUN} ${DISTCC_FLAG} ${PRESET_FILE_FLAGS} \
154161
${SCCACHE_FLAG} \
155-
--preset="${PRESET_PREFIX}${SWIFT_PACKAGE}${NO_TEST}${USE_OS_RUNTIME}${MACOS_ONLY}" \
162+
--preset="${PRESET_PREFIX}${SWIFT_PACKAGE}${NO_ASSERTIONS}${NO_TEST}${USE_OS_RUNTIME}${MACOS_ONLY}" \
156163
install_destdir="${SWIFT_INSTALL_DIR}" \
157164
installable_package="${SWIFT_INSTALLABLE_PACKAGE}" \
158165
install_toolchain_dir="${SWIFT_TOOLCHAIN_DIR}" \

0 commit comments

Comments
 (0)