Skip to content

Commit b944b68

Browse files
committed
build-script: add a flag to skip building/installing swift-syntax's swift side artifacts.
1 parent f965d96 commit b944b68

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"
@@ -2596,6 +2599,9 @@ for host in "${ALL_HOSTS[@]}"; do
25962599
continue
25972600
;;
25982601
swiftsyntax)
2602+
if [[ "${SKIP_SWIFTSYNTAX_SWIFTSIDE}" ]]; then
2603+
continue
2604+
fi
25992605
set_swiftsyntax_build_command
26002606
call "${swiftsyntax_build_command[@]}"
26012607

@@ -3600,7 +3606,9 @@ for host in "${ALL_HOSTS[@]}"; do
36003606
DYLIB_DIR="${host_install_destdir}${host_install_prefix}/lib/swift/${SWIFT_HOST_VARIANT}"
36013607
MODULE_DIR="${DYLIB_DIR}/${SWIFT_HOST_VARIANT_ARCH}"
36023608
fi
3603-
3609+
if [[ "${SKIP_SWIFTSYNTAX_SWIFTSIDE}" ]]; then
3610+
continue
3611+
fi
36043612
set_swiftsyntax_build_command
36053613
if [[ -z "${SKIP_INSTALL_SWIFTSYNTAX_MODULE}" ]] ; then
36063614
call "${swiftsyntax_build_command[@]}" --dylib-dir="${DYLIB_DIR}" --swiftmodule-dir "${MODULE_DIR}" --install

0 commit comments

Comments
 (0)