@@ -79,10 +79,6 @@ KNOWN_SETTINGS=(
79
79
playgroundsupport-build-type " Debug" " the build variant for PlaygroundSupport"
80
80
xctest-build-type " Debug" " the build variant for xctest"
81
81
swiftpm-build-type " Debug" " the build variant for swiftpm"
82
- swiftsyntax-build-type " Debug" " the build variant for swiftSyntax"
83
- # When this flag is set, the build-script will only build/install the swift-syntax parser
84
- # This is a temporary workaround of having a separate build product for swift-syntax parser
85
- skip-swiftsyntax-swiftside " " " skip building/installing the swift side of swiftsyntax"
86
82
llbuild-enable-assertions " 1" " enable assertions in llbuild"
87
83
enable-asan " " " enable Address Sanitizer"
88
84
enable-ubsan " " " enable Undefined Behavior Sanitizer"
@@ -101,8 +97,6 @@ KNOWN_SETTINGS=(
101
97
installable-package " " " the path to the archive of the installation directory"
102
98
test-installable-package " " " whether to run post-packaging tests on the produced package"
103
99
reconfigure " " " force a CMake configuration run even if CMakeCache.txt already exists"
104
- build-libparser-only " " " only build libSwiftSyntaxParser"
105
- libparser-ver " " " current version of libSwiftSyntaxParser"
106
100
skip-reconfigure " " " set to skip reconfigure"
107
101
swift-primary-variant-sdk " " " default SDK for target binaries"
108
102
swift-primary-variant-arch " " " default arch for target binaries"
@@ -126,7 +120,6 @@ KNOWN_SETTINGS=(
126
120
skip-build-llbuild " " " set to skip building llbuild"
127
121
skip-build-libcxx " " " set to skip building libcxx"
128
122
skip-build-swiftpm " " " set to skip building swiftpm"
129
- skip-build-swiftsyntax " " " set to skip building swiftSyntax"
130
123
skip-build-xctest " " " set to skip building xctest"
131
124
skip-build-foundation " " " set to skip building foundation"
132
125
skip-build-libdispatch " " " set to skip building libdispatch"
@@ -140,7 +133,6 @@ KNOWN_SETTINGS=(
140
133
skip-test-swift " " " set to skip testing Swift"
141
134
skip-test-llbuild " " " set to skip testing llbuild"
142
135
skip-test-swiftpm " " " set to skip testing swiftpm"
143
- skip-test-swiftsyntax " " " set to skip testing swiftSyntax"
144
136
skip-test-xctest " " " set to skip testing xctest"
145
137
skip-test-foundation " " " set to skip testing foundation"
146
138
skip-test-libdispatch " " " set to skip testing libdispatch"
@@ -198,9 +190,6 @@ KNOWN_SETTINGS=(
198
190
install-lldb " " " whether to install LLDB"
199
191
install-llbuild " " " whether to install llbuild"
200
192
install-swiftpm " " " whether to install swiftpm"
201
- install-swiftsyntax " " " whether to install swiftsyntax"
202
- skip-install-swiftsyntax-module " " " set to skip installing swiftsyntax modules"
203
- swiftsyntax-verify-generated-files " " " set to verify that the generated files in the source tree match the ones that would be generated from current master"
204
193
install-xctest " " " whether to install xctest"
205
194
install-foundation " " " whether to install foundation"
206
195
install-libcxx " " " whether to install libc++"
@@ -1191,7 +1180,6 @@ CMARK_SOURCE_DIR="${WORKSPACE}/cmark"
1191
1180
LLDB_SOURCE_DIR=" ${WORKSPACE} /lldb"
1192
1181
LLBUILD_SOURCE_DIR=" ${WORKSPACE} /llbuild"
1193
1182
SWIFTPM_SOURCE_DIR=" ${WORKSPACE} /swiftpm"
1194
- SWIFTSYNTAX_SOURCE_DIR=" ${WORKSPACE} /swift-syntax"
1195
1183
STRESSTEST_PACKAGE_DIR=" ${WORKSPACE} /swift-stress-tester"
1196
1184
XCTEST_SOURCE_DIR=" ${WORKSPACE} /swift-corelibs-xctest"
1197
1185
FOUNDATION_SOURCE_DIR=" ${WORKSPACE} /swift-corelibs-foundation"
@@ -1245,8 +1233,8 @@ PRODUCTS=("${PRODUCTS[@]}" swift)
1245
1233
if [[ ! " ${SKIP_BUILD_LLDB} " ]] ; then
1246
1234
PRODUCTS=(" ${PRODUCTS[@]} " lldb)
1247
1235
fi
1248
- # LLBuild, SwiftPM, SwiftSyntax and XCTest are dependent on Foundation, so
1249
- # Foundation must be added to the list of build products first.
1236
+ # LLBuild, SwiftPM and XCTest are dependent on Foundation, so Foundation must
1237
+ # be added to the list of build products first.
1250
1238
if [[ ! " ${SKIP_BUILD_LIBDISPATCH} " ]] ; then
1251
1239
PRODUCTS=(" ${PRODUCTS[@]} " libdispatch)
1252
1240
if [[ -z " ${SKIP_BUILD_SWIFT_STATIC_LIBDISPATCH} " ]] ; then
@@ -1265,19 +1253,14 @@ fi
1265
1253
if [[ ! " ${SKIP_BUILD_PLAYGROUNDSUPPORT} " ]] ; then
1266
1254
PRODUCTS=(" ${PRODUCTS[@]} " playgroundsupport)
1267
1255
fi
1268
- # SwiftPM and SwiftSyntax are dependent on XCTest, so XCTest must be added to
1269
- # the list of build products first.
1256
+ # SwiftPM is dependent on XCTest, so XCTest must be added to the list of build
1257
+ # products first.
1270
1258
if [[ ! " ${SKIP_BUILD_XCTEST} " ]] ; then
1271
1259
PRODUCTS=(" ${PRODUCTS[@]} " xctest)
1272
1260
fi
1273
- # SwiftSyntax is dependent on SwiftPM, so SwiftPM must be added to the list of
1274
- # build products first.
1275
1261
if [[ ! " ${SKIP_BUILD_SWIFTPM} " ]] ; then
1276
1262
PRODUCTS=(" ${PRODUCTS[@]} " swiftpm)
1277
1263
fi
1278
- if [[ ! " ${SKIP_BUILD_SWIFTSYNTAX} " ]] ; then
1279
- PRODUCTS=(" ${PRODUCTS[@]} " swiftsyntax)
1280
- fi
1281
1264
1282
1265
# Checks if a given product is enabled (i.e. part of $PRODUCTS array)
1283
1266
function contains_product() {
@@ -1583,9 +1566,6 @@ function build_directory_bin() {
1583
1566
swiftpm)
1584
1567
echo " ${root} /${SWIFTPM_BUILD_TYPE} /bin"
1585
1568
;;
1586
- swiftsyntax)
1587
- echo " ${root} /${SWIFTSYNTAX_BUILD_TYPE} /bin"
1588
- ;;
1589
1569
xctest)
1590
1570
echo " ${root} /${XCTEST_BUILD_TYPE} /bin"
1591
1571
;;
@@ -1728,9 +1708,6 @@ function cmake_config_opt() {
1728
1708
swiftpm)
1729
1709
echo " --config ${SWIFTPM_BUILD_TYPE} "
1730
1710
;;
1731
- swiftsyntax)
1732
- echo " --config ${SWIFTSYNTAX_BUILD_TYPE} "
1733
- ;;
1734
1711
xctest)
1735
1712
echo " --config ${XCTEST_BUILD_TYPE} "
1736
1713
;;
@@ -1821,43 +1798,13 @@ function set_swiftpm_bootstrap_command() {
1821
1798
1822
1799
function swiftpm_find_tool() {
1823
1800
tool=$1
1824
- if [[ " ${SKIP_BUILD_SWIFTPM} " || " ${BUILD_LIBPARSER_ONLY} " ]]; then
1801
+ if [[ " ${SKIP_BUILD_SWIFTPM} " ]]; then
1825
1802
echo " $( xcrun_find_tool ${tool} ) "
1826
1803
else
1827
1804
echo " $( build_directory_bin ${LOCAL_HOST} swiftpm) /${tool} "
1828
1805
fi
1829
1806
}
1830
1807
1831
- function set_swiftsyntax_build_command() {
1832
- if [ " ${BUILD_LIBPARSER_ONLY} " ]; then
1833
- # we don't have a compiler built so we have to use the one in the environment.
1834
- SWIFTC_BIN=" $( xcrun_find_tool swiftc) "
1835
- else
1836
- SWIFTC_BIN=" $( build_directory_bin ${LOCAL_HOST} swift) /swiftc"
1837
- fi
1838
-
1839
- swiftsyntax_build_command=(" ${SWIFTSYNTAX_SOURCE_DIR} /build-script.py" )
1840
- # Add --release if we have to build in release mode.
1841
- if [[ $( is_cmake_release_build_type " ${SWIFTSYNTAX_BUILD_TYPE} " ) ]] ; then
1842
- swiftsyntax_build_command+=(--release)
1843
- fi
1844
- if [[ " ${VERBOSE_BUILD} " ]] ; then
1845
- swiftsyntax_build_command+=(-v)
1846
- fi
1847
- swiftsyntax_build_command+=(
1848
- --build-dir=" $( build_directory ${host} swiftsyntax) "
1849
- --swift-build-exec=" $( swiftpm_find_tool swift-build) "
1850
- --swift-test-exec=" $( swiftpm_find_tool swift-test) "
1851
- --swiftc-exec=" ${SWIFTC_BIN} "
1852
- --syntax-parser-header-dir=" ${SWIFT_SOURCE_DIR} /include/swift-c/SyntaxParser"
1853
- --syntax-parser-lib-dir=" $( build_directory ${host} swift) /lib"
1854
- --swift-syntax-test-exec=" $( build_directory_bin ${LOCAL_HOST} swift) /swift-syntax-test"
1855
- --filecheck-exec=" $( build_directory_bin ${LOCAL_HOST} llvm) /FileCheck" )
1856
- if [[ " ${SWIFTSYNTAX_VERIFY_GENERATED_FILES} " ]] ; then
1857
- swiftsyntax_build_command+=(--verify-generated-files)
1858
- fi
1859
- }
1860
-
1861
1808
#
1862
1809
# Configure and build each product
1863
1810
#
@@ -2358,15 +2305,6 @@ for host in "${ALL_HOSTS[@]}"; do
2358
2305
build_targets=(" ${build_targets[@]} "
2359
2306
" ${SWIFT_BENCHMARK_TARGETS[@]} " )
2360
2307
fi
2361
- if [ " ${BUILD_LIBPARSER_ONLY} " ]; then
2362
- build_targets=(libSwiftSyntaxParser)
2363
- if [ " ${LIBPARSER_VER} " ] ; then
2364
- cmake_options=(
2365
- " ${cmake_options[@]} "
2366
- -DSWIFT_LIBPARSER_VER:STRING=" ${LIBPARSER_VER} "
2367
- )
2368
- fi
2369
- fi
2370
2308
skip_build=${SKIP_BUILD_SWIFT}
2371
2309
;;
2372
2310
lldb)
@@ -2503,15 +2441,6 @@ for host in "${ALL_HOSTS[@]}"; do
2503
2441
call " ${swiftpm_bootstrap_command[@]} "
2504
2442
2505
2443
# swiftpm installs itself with a bootstrap method. No further cmake building is performed.
2506
- continue
2507
- ;;
2508
- swiftsyntax)
2509
- if [[ " ${SKIP_SWIFTSYNTAX_SWIFTSIDE} " ]]; then
2510
- continue
2511
- fi
2512
- set_swiftsyntax_build_command
2513
- call " ${swiftsyntax_build_command[@]} "
2514
-
2515
2444
continue
2516
2445
;;
2517
2446
xctest)
@@ -3016,16 +2945,6 @@ for host in "${ALL_HOSTS[@]}"; do
3016
2945
# As swiftpm tests itself, we break early here.
3017
2946
continue
3018
2947
;;
3019
- swiftsyntax)
3020
- if [[ " ${SKIP_TEST_SWIFTSYNTAX} " ]]; then
3021
- continue
3022
- fi
3023
- echo " --- Running tests for ${product} ---"
3024
- set_swiftsyntax_build_command
3025
- call " ${swiftsyntax_build_command[@]} " -t
3026
- # As swiftSyntax tests itself, we break early here.
3027
- continue
3028
- ;;
3029
2948
xctest)
3030
2949
if [[ " ${SKIP_TEST_XCTEST} " ]]; then
3031
2950
continue
@@ -3310,11 +3229,6 @@ for host in "${ALL_HOSTS[@]}"; do
3310
3229
continue
3311
3230
fi
3312
3231
INSTALL_TARGETS=install-swift-components
3313
- # Swift syntax parser is currently a sub-product of Swift;
3314
- # We need to specify the install target separately here.
3315
- if [ " ${BUILD_LIBPARSER_ONLY} " ]; then
3316
- INSTALL_TARGETS=tools/libSwiftSyntaxParser/install
3317
- fi
3318
3232
;;
3319
3233
llbuild)
3320
3234
if [[ -z " ${INSTALL_LLBUILD} " ]] ; then
@@ -3345,43 +3259,6 @@ for host in "${ALL_HOSTS[@]}"; do
3345
3259
set_swiftpm_bootstrap_command
3346
3260
call " ${swiftpm_bootstrap_command[@]} " --prefix=" ${host_install_destdir}${host_install_prefix} " install
3347
3261
# As swiftpm bootstraps the installation itself, we break early here.
3348
- continue
3349
- ;;
3350
- swiftsyntax)
3351
- if [[ -z " ${INSTALL_SWIFTSYNTAX} " ]] ; then
3352
- continue
3353
- fi
3354
- if [[ -z " ${INSTALL_DESTDIR} " ]] ; then
3355
- echo " --install-destdir is required to install products."
3356
- exit 1
3357
- fi
3358
- echo " --- Installing ${product} ---"
3359
- if [ " ${BUILD_LIBPARSER_ONLY} " ]; then
3360
- # We don't have a toolchain so we should install to the specified dir
3361
- DYLIB_DIR=" ${INSTALL_DESTDIR} "
3362
- MODULE_DIR=" ${INSTALL_DESTDIR} /${product} .swiftmodule"
3363
- # Create the install dir if it doesn't exist
3364
- call mkdir -p " ${INSTALL_DESTDIR} "
3365
- # Install libParser is necessary
3366
- rsync -a " $( build_directory ${host} swift) /lib/lib_InternalSwiftSyntaxParser.dylib" " ${INSTALL_DESTDIR} "
3367
- # Install module map of libParser so client can import SwiftSyntax
3368
- rsync -a " ${SWIFT_SOURCE_DIR} /include/swift-c/SyntaxParser" " ${INSTALL_DESTDIR} "
3369
- else
3370
- # We have a toolchain so install to the toolchain
3371
- DYLIB_DIR=" ${host_install_destdir}${host_install_prefix} /lib/swift/${SWIFT_HOST_VARIANT} "
3372
- MODULE_DIR=" ${DYLIB_DIR} /${product} .swiftmodule"
3373
- fi
3374
- if [[ " ${SKIP_SWIFTSYNTAX_SWIFTSIDE} " ]]; then
3375
- continue
3376
- fi
3377
- set_swiftsyntax_build_command
3378
- if [[ -z " ${SKIP_INSTALL_SWIFTSYNTAX_MODULE} " ]] ; then
3379
- mkdir -p " ${MODULE_DIR} "
3380
- call " ${swiftsyntax_build_command[@]} " --dylib-dir=" ${DYLIB_DIR} " --swiftmodule-base-name " ${MODULE_DIR} /${SWIFT_HOST_VARIANT_ARCH} " --install
3381
- else
3382
- call " ${swiftsyntax_build_command[@]} " --dylib-dir=" ${DYLIB_DIR} " --install
3383
- fi
3384
-
3385
3262
continue
3386
3263
;;
3387
3264
xctest)
0 commit comments