Skip to content

build-script: add a flag to skip building/installing swift-syntax's swift side #22220

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 29, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions utils/build-presets.ini
Original file line number Diff line number Diff line change
Expand Up @@ -1780,3 +1780,4 @@ no-assertions
build-libparser-only
swiftsyntax
verbose-build
skip-swiftsyntax-swiftside
10 changes: 9 additions & 1 deletion utils/build-script-impl
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ KNOWN_SETTINGS=(
xctest-build-type "Debug" "the build variant for xctest"
swiftpm-build-type "Debug" "the build variant for swiftpm"
swiftsyntax-build-type "Debug" "the build variant for swiftSyntax"
# When this flag is set, the build-script will only build/install the swift-syntax parser
# This is a temporary workaround of having a separate build product for swift-syntax parser
skip-swiftsyntax-swiftside "" "skip building/installing the swift side of swiftsyntax"
skstresstester-build-type "Debug" "the build variant for the SourceKit stress tester"
swiftevolve-build-type "Debug" "the build variant for the swift-evolve tool"
llbuild-enable-assertions "1" "enable assertions in llbuild"
Expand Down Expand Up @@ -2596,6 +2599,9 @@ for host in "${ALL_HOSTS[@]}"; do
continue
;;
swiftsyntax)
if [[ "${SKIP_SWIFTSYNTAX_SWIFTSIDE}" ]]; then
continue
fi
set_swiftsyntax_build_command
call "${swiftsyntax_build_command[@]}"

Expand Down Expand Up @@ -3600,7 +3606,9 @@ for host in "${ALL_HOSTS[@]}"; do
DYLIB_DIR="${host_install_destdir}${host_install_prefix}/lib/swift/${SWIFT_HOST_VARIANT}"
MODULE_DIR="${DYLIB_DIR}/${SWIFT_HOST_VARIANT_ARCH}"
fi

if [[ "${SKIP_SWIFTSYNTAX_SWIFTSIDE}" ]]; then
continue
fi
set_swiftsyntax_build_command
if [[ -z "${SKIP_INSTALL_SWIFTSYNTAX_MODULE}" ]] ; then
call "${swiftsyntax_build_command[@]}" --dylib-dir="${DYLIB_DIR}" --swiftmodule-dir "${MODULE_DIR}" --install
Expand Down