Skip to content

Commit d5c28d8

Browse files
authored
Merge pull request #27841 from ahoppen/forward-verify-generated-files
SwiftSyntax: Commit gyb-generated files to master
2 parents 54e94b5 + f33c95d commit d5c28d8

File tree

2 files changed

+26
-3
lines changed

2 files changed

+26
-3
lines changed

utils/build-presets.ini

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1136,6 +1136,10 @@ libcxx
11361136
indexstore-db
11371137
sourcekit-lsp
11381138

1139+
# Don't generate the SwiftSyntax gyb files. Instead verify that up-to-date ones
1140+
# are checked in.
1141+
swiftsyntax-verify-generated-files
1142+
11391143
# Build with debug info, this allows us to symbolicate crashes from
11401144
# production builds.
11411145
release-debuginfo
@@ -1373,6 +1377,10 @@ llbuild
13731377
swiftpm
13741378
swiftsyntax
13751379

1380+
# Don't generate the SwiftSyntax gyb files. Instead verify that up-to-date ones
1381+
# are checked in.
1382+
swiftsyntax-verify-generated-files
1383+
13761384
# Build sourcekit-lsp & indexstore-db
13771385
indexstore-db
13781386
sourcekit-lsp
@@ -1547,6 +1555,17 @@ assertions
15471555
# Downstream projects that import llbuild+SwiftPM.
15481556
sourcekit-lsp
15491557

1558+
#===------------------------------------------------------------------------===#
1559+
# Test Swift Syntax
1560+
#===------------------------------------------------------------------------===#
1561+
1562+
[preset: buildbot_swiftsyntax_macos]
1563+
mixin-preset=mixin_swiftpm_package_macos_platform
1564+
release
1565+
assertions
1566+
swiftsyntax
1567+
swiftsyntax-verify-generated-files
1568+
15501569
#===------------------------------------------------------------------------===#
15511570
# Test Swift Stress Tester
15521571
#===------------------------------------------------------------------------===#

utils/build-script-impl

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,7 @@ KNOWN_SETTINGS=(
200200
install-swiftpm "" "whether to install swiftpm"
201201
install-swiftsyntax "" "whether to install swiftsyntax"
202202
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"
203204
install-xctest "" "whether to install xctest"
204205
install-foundation "" "whether to install foundation"
205206
install-libcxx "" "whether to install libc++"
@@ -1244,7 +1245,7 @@ PRODUCTS=("${PRODUCTS[@]}" swift)
12441245
if [[ ! "${SKIP_BUILD_LLDB}" ]] ; then
12451246
PRODUCTS=("${PRODUCTS[@]}" lldb)
12461247
fi
1247-
# LLBuild, SwiftPM, SwiftSyntax and XCTest are dependent on Foundation, so
1248+
# LLBuild, SwiftPM, SwiftSyntax and XCTest are dependent on Foundation, so
12481249
# Foundation must be added to the list of build products first.
12491250
if [[ ! "${SKIP_BUILD_LIBDISPATCH}" ]] ; then
12501251
PRODUCTS=("${PRODUCTS[@]}" libdispatch)
@@ -1264,12 +1265,12 @@ fi
12641265
if [[ ! "${SKIP_BUILD_PLAYGROUNDSUPPORT}" ]] ; then
12651266
PRODUCTS=("${PRODUCTS[@]}" playgroundsupport)
12661267
fi
1267-
# SwiftPM and SwiftSyntax are dependent on XCTest, so XCTest must be added to
1268+
# SwiftPM and SwiftSyntax are dependent on XCTest, so XCTest must be added to
12681269
# the list of build products first.
12691270
if [[ ! "${SKIP_BUILD_XCTEST}" ]] ; then
12701271
PRODUCTS=("${PRODUCTS[@]}" xctest)
12711272
fi
1272-
# SwiftSyntax is dependent on SwiftPM, so SwiftPM must be added to the list of
1273+
# SwiftSyntax is dependent on SwiftPM, so SwiftPM must be added to the list of
12731274
# build products first.
12741275
if [[ ! "${SKIP_BUILD_SWIFTPM}" ]] ; then
12751276
PRODUCTS=("${PRODUCTS[@]}" swiftpm)
@@ -1852,6 +1853,9 @@ function set_swiftsyntax_build_command() {
18521853
--syntax-parser-lib-dir="$(build_directory ${host} swift)/lib"
18531854
--swift-syntax-test-exec="$(build_directory_bin ${LOCAL_HOST} swift)/swift-syntax-test"
18541855
--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
18551859
}
18561860

18571861
#

0 commit comments

Comments
 (0)