Skip to content

Commit 283de9f

Browse files
authored
Merge pull request #22220 from nkcsgexi/xcbuild-ss-flag
build-script: add a flag to skip building/installing swift-syntax's swift side
2 parents 37183a7 + b944b68 commit 283de9f

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

utils/build-presets.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1780,3 +1780,4 @@ no-assertions
17801780
build-libparser-only
17811781
swiftsyntax
17821782
verbose-build
1783+
skip-swiftsyntax-swiftside

utils/build-script-impl

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,9 @@ KNOWN_SETTINGS=(
8383
xctest-build-type "Debug" "the build variant for xctest"
8484
swiftpm-build-type "Debug" "the build variant for swiftpm"
8585
swiftsyntax-build-type "Debug" "the build variant for swiftSyntax"
86+
# When this flag is set, the build-script will only build/install the swift-syntax parser
87+
# This is a temporary workaround of having a separate build product for swift-syntax parser
88+
skip-swiftsyntax-swiftside "" "skip building/installing the swift side of swiftsyntax"
8689
skstresstester-build-type "Debug" "the build variant for the SourceKit stress tester"
8790
swiftevolve-build-type "Debug" "the build variant for the swift-evolve tool"
8891
llbuild-enable-assertions "1" "enable assertions in llbuild"
@@ -2542,6 +2545,9 @@ for host in "${ALL_HOSTS[@]}"; do
25422545
continue
25432546
;;
25442547
swiftsyntax)
2548+
if [[ "${SKIP_SWIFTSYNTAX_SWIFTSIDE}" ]]; then
2549+
continue
2550+
fi
25452551
set_swiftsyntax_build_command
25462552
call "${swiftsyntax_build_command[@]}"
25472553

@@ -3548,7 +3554,9 @@ for host in "${ALL_HOSTS[@]}"; do
35483554
DYLIB_DIR="${host_install_destdir}${host_install_prefix}/lib/swift/${SWIFT_HOST_VARIANT}"
35493555
MODULE_DIR="${DYLIB_DIR}/${SWIFT_HOST_VARIANT_ARCH}"
35503556
fi
3551-
3557+
if [[ "${SKIP_SWIFTSYNTAX_SWIFTSIDE}" ]]; then
3558+
continue
3559+
fi
35523560
set_swiftsyntax_build_command
35533561
if [[ -z "${SKIP_INSTALL_SWIFTSYNTAX_MODULE}" ]] ; then
35543562
call "${swiftsyntax_build_command[@]}" --dylib-dir="${DYLIB_DIR}" --swiftmodule-dir "${MODULE_DIR}" --install

0 commit comments

Comments
 (0)