Skip to content

SwiftSyntax: Commit gyb-generated files to master #27841

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 3 commits into from
Oct 25, 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
19 changes: 19 additions & 0 deletions utils/build-presets.ini
Original file line number Diff line number Diff line change
Expand Up @@ -1125,6 +1125,10 @@ libcxx
indexstore-db
sourcekit-lsp

# Don't generate the SwiftSyntax gyb files. Instead verify that up-to-date ones
# are checked in.
swiftsyntax-verify-generated-files

# Build with debug info, this allows us to symbolicate crashes from
# production builds.
release-debuginfo
Expand Down Expand Up @@ -1360,6 +1364,10 @@ llbuild
swiftpm
swiftsyntax

# Don't generate the SwiftSyntax gyb files. Instead verify that up-to-date ones
# are checked in.
swiftsyntax-verify-generated-files

# Build sourcekit-lsp & indexstore-db
indexstore-db
sourcekit-lsp
Expand Down Expand Up @@ -1529,6 +1537,17 @@ assertions
# Downstream projects that import llbuild+SwiftPM.
sourcekit-lsp

#===------------------------------------------------------------------------===#
# Test Swift Syntax
#===------------------------------------------------------------------------===#

[preset: buildbot_swiftsyntax_macos]
mixin-preset=mixin_swiftpm_package_macos_platform
release
assertions
swiftsyntax
swiftsyntax-verify-generated-files

#===------------------------------------------------------------------------===#
# Test Swift Stress Tester
#===------------------------------------------------------------------------===#
Expand Down
10 changes: 7 additions & 3 deletions utils/build-script-impl
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ KNOWN_SETTINGS=(
install-swiftpm "" "whether to install swiftpm"
install-swiftsyntax "" "whether to install swiftsyntax"
skip-install-swiftsyntax-module "" "set to skip installing swiftsyntax modules"
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"
install-xctest "" "whether to install xctest"
install-foundation "" "whether to install foundation"
install-libcxx "" "whether to install libc++"
Expand Down Expand Up @@ -1244,7 +1245,7 @@ PRODUCTS=("${PRODUCTS[@]}" swift)
if [[ ! "${SKIP_BUILD_LLDB}" ]] ; then
PRODUCTS=("${PRODUCTS[@]}" lldb)
fi
# LLBuild, SwiftPM, SwiftSyntax and XCTest are dependent on Foundation, so
# LLBuild, SwiftPM, SwiftSyntax and XCTest are dependent on Foundation, so
# Foundation must be added to the list of build products first.
if [[ ! "${SKIP_BUILD_LIBDISPATCH}" ]] ; then
PRODUCTS=("${PRODUCTS[@]}" libdispatch)
Expand All @@ -1264,12 +1265,12 @@ fi
if [[ ! "${SKIP_BUILD_PLAYGROUNDSUPPORT}" ]] ; then
PRODUCTS=("${PRODUCTS[@]}" playgroundsupport)
fi
# SwiftPM and SwiftSyntax are dependent on XCTest, so XCTest must be added to
# SwiftPM and SwiftSyntax are dependent on XCTest, so XCTest must be added to
# the list of build products first.
if [[ ! "${SKIP_BUILD_XCTEST}" ]] ; then
PRODUCTS=("${PRODUCTS[@]}" xctest)
fi
# SwiftSyntax is dependent on SwiftPM, so SwiftPM must be added to the list of
# SwiftSyntax is dependent on SwiftPM, so SwiftPM must be added to the list of
# build products first.
if [[ ! "${SKIP_BUILD_SWIFTPM}" ]] ; then
PRODUCTS=("${PRODUCTS[@]}" swiftpm)
Expand Down Expand Up @@ -1852,6 +1853,9 @@ function set_swiftsyntax_build_command() {
--syntax-parser-lib-dir="$(build_directory ${host} swift)/lib"
--swift-syntax-test-exec="$(build_directory_bin ${LOCAL_HOST} swift)/swift-syntax-test"
--filecheck-exec="$(build_directory_bin ${LOCAL_HOST} llvm)/FileCheck")
if [[ "${SWIFTSYNTAX_VERIFY_GENERATED_FILES}" ]] ; then
swiftsyntax_build_command+=(--verify-generated-files)
fi
}

#
Expand Down