Skip to content

Commit 1aafd55

Browse files
committed
build-script: add missing options, use more terse syntax
This makes the product computation more terse and adds the missing options. The functional aspects of this change include renaming the `SKIP_BUILD_SWIFT_STATIC_LIBDISPATCH` to `SKIP_BUILD_STATIC_LIBDISPATCH` which keeps it in line with the other skip options. We also now list the option properly.
1 parent f6e0db5 commit 1aafd55

File tree

1 file changed

+14
-32
lines changed

1 file changed

+14
-32
lines changed

utils/build-script-impl

Lines changed: 14 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,8 @@ KNOWN_SETTINGS=(
149149
skip-build-llvm "" "set to skip building LLVM/Clang"
150150
skip-build-osx "" "set to skip building Swift stdlibs for OS X"
151151
skip-build-playgroundsupport "" "set to skip building PlaygroundSupport"
152+
skip-build-static-foundation "" "set to skip building static Foundation"
153+
skip-build-static-libdispatch "" "set to skip building static libdispatch"
152154
skip-build-swift "" "set to skip building Swift"
153155
skip-build-tvos-device "" "set to skip building Swift stdlibs for tvOS devices (i.e. build simulators only)"
154156
skip-build-tvos-simulator "" "set to skip building Swift stdlibs for tvOS simulators (i.e. build devices only)"
@@ -1082,39 +1084,19 @@ if [[ ! "${SKIP_BUILD_PLAYGROUNDSUPPORT}" && ! -d ${PLAYGROUNDSUPPORT_SOURCE_DIR
10821084
fi
10831085

10841086
PRODUCTS=(cmark llvm)
1085-
if [[ ! "${SKIP_BUILD_LIBCXX}" ]] ; then
1086-
PRODUCTS=("${PRODUCTS[@]}" libcxx)
1087-
fi
1088-
if [[ ! "${SKIP_BUILD_LIBICU}" ]] ; then
1089-
PRODUCTS=("${PRODUCTS[@]}" libicu)
1090-
fi
1091-
PRODUCTS=("${PRODUCTS[@]}" swift)
1092-
if [[ ! "${SKIP_BUILD_LLDB}" ]] ; then
1093-
PRODUCTS=("${PRODUCTS[@]}" lldb)
1094-
fi
1095-
# LLBuild and XCTest are dependent on Foundation, so Foundation must
1087+
[[ "${SKIP_BUILD_LIBCXX}" ]] || PRODUCTS+=(libcxx)
1088+
[[ "${SKIP_BUILD_LIBICU}" ]] || PRODUCTS+=(libicu)
1089+
PRODUCTS+=(swift)
1090+
[[ "${SKIP_BUILD_LLDB}" ]] || PRODUCTS+=(lldb)
1091+
[[ "${SKIP_BUILD_LIBDISPATCH}" ]] || PRODUCTS+=(libdispatch)
1092+
[[ "${SKIP_BUILD_STATIC_LIBDISPATCH}" ]] || PRODUCTS+=(libdispatch_static)
1093+
# llbuild and XCTest depend on Foundation, so Foundation must
10961094
# be added to the list of build products first.
1097-
if [[ ! "${SKIP_BUILD_LIBDISPATCH}" ]] ; then
1098-
PRODUCTS=("${PRODUCTS[@]}" libdispatch)
1099-
if [[ -z "${SKIP_BUILD_SWIFT_STATIC_LIBDISPATCH}" ]] ; then
1100-
PRODUCTS=("${PRODUCTS[@]}" libdispatch_static)
1101-
fi
1102-
fi
1103-
if [[ ! "${SKIP_BUILD_FOUNDATION}" ]] ; then
1104-
PRODUCTS=("${PRODUCTS[@]}" foundation)
1105-
if [[ -z "${SKIP_BUILD_STATIC_FOUNDATION}" ]] ; then
1106-
PRODUCTS=("${PRODUCTS[@]}" foundation_static)
1107-
fi
1108-
fi
1109-
if [[ ! "${SKIP_BUILD_LLBUILD}" ]] ; then
1110-
PRODUCTS=("${PRODUCTS[@]}" llbuild)
1111-
fi
1112-
if [[ ! "${SKIP_BUILD_PLAYGROUNDSUPPORT}" ]] ; then
1113-
PRODUCTS=("${PRODUCTS[@]}" playgroundsupport)
1114-
fi
1115-
if [[ ! "${SKIP_BUILD_XCTEST}" ]] ; then
1116-
PRODUCTS=("${PRODUCTS[@]}" xctest)
1117-
fi
1095+
[[ "${SKIP_BUILD_FOUNDATION}" ]] || PRODUCTS+=(foundation)
1096+
[[ "${SKIP_BUILD_STATIC_FOUNDATION}" ]] || PRODUCTS+=(foundation_static)
1097+
[[ "${SKIP_BUILD_LLBUILD}" ]] || PRODUCTS+=(llbuild)
1098+
[[ "${SKIP_BUILD_XCTEST}" ]] || PRODUCTS+=(xctest)
1099+
[[ "${SKIP_BUILD_PLAYGROUNDSUPPORT}" ]] || PRODUCTS+=(playgroundsupport)
11181100

11191101
# get_host_specific_variable(host, name)
11201102
#

0 commit comments

Comments
 (0)