Skip to content

Delete _InternalSwiftSyntaxParser And Its Build Infrastructure #61898

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 2 commits into from
Nov 4, 2022
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
1 change: 0 additions & 1 deletion .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ filename =

./utils/80+-check,
./utils/backtrace-check,
./utils/build-parser-lib,
./utils/build-script,
./utils/check-incremental,
./utils/coverage/coverage-build-db,
Expand Down
11 changes: 2 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -572,13 +572,6 @@ option(SWIFT_ENABLE_GLOBAL_ISEL_ARM64
"Enable global isel on arm64"
FALSE)

cmake_dependent_option(SWIFT_BUILD_SYNTAXPARSERLIB
"Build the Swift Syntax Parser library" TRUE
"SWIFT_ENABLE_DISPATCH" FALSE)
cmake_dependent_option(SWIFT_BUILD_ONLY_SYNTAXPARSERLIB
"Only build the Swift Syntax Parser library" FALSE
"SWIFT_BUILD_SYNTAXPARSERLIB" FALSE)

cmake_dependent_option(SWIFT_BUILD_SOURCEKIT
"Build SourceKit" TRUE
"SWIFT_ENABLE_DISPATCH" FALSE)
Expand Down Expand Up @@ -637,13 +630,13 @@ set(SWIFT_BUILD_HOST_DISPATCH FALSE)
if(SWIFT_ENABLE_DISPATCH AND NOT CMAKE_SYSTEM_NAME STREQUAL Darwin)
# Only build libdispatch for the host if the host tools are being built and
# specifically if these two libraries that depend on it are built.
if(SWIFT_INCLUDE_TOOLS AND (SWIFT_BUILD_SYNTAXPARSERLIB OR SWIFT_BUILD_SOURCEKIT))
if(SWIFT_INCLUDE_TOOLS AND SWIFT_BUILD_SOURCEKIT)
set(SWIFT_BUILD_HOST_DISPATCH TRUE)
endif()

if(SWIFT_BUILD_HOST_DISPATCH OR SWIFT_CONCURRENCY_USES_DISPATCH)
if(NOT EXISTS "${SWIFT_PATH_TO_LIBDISPATCH_SOURCE}")
message(SEND_ERROR "SyntaxParserLib, SourceKit, and concurrency require libdispatch on non-Darwin hosts. Please specify SWIFT_PATH_TO_LIBDISPATCH_SOURCE")
message(SEND_ERROR "SourceKit and concurrency require libdispatch on non-Darwin hosts. Please specify SWIFT_PATH_TO_LIBDISPATCH_SOURCE")
endif()
endif()
endif()
Expand Down
1 change: 0 additions & 1 deletion cmake/caches/Linux-x86_64.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,6 @@ set(SWIFT_INSTALL_COMPONENTS
sourcekit-inproc
swift-remote-mirror
swift-remote-mirror-headers
parser-lib
CACHE STRING "")

set(LLVM_DISTRIBUTION_COMPONENTS
Expand Down
1 change: 0 additions & 1 deletion cmake/caches/Runtime-Android-aarch64.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ set(SWIFT_INCLUDE_TESTS NO CACHE BOOL "")
set(SWIFT_INCLUDE_DOCS NO CACHE BOOL "")

# NOTE(compnerd) these are part of the toolchain, not the runtime.
set(SWIFT_BUILD_SYNTAXPARSERLIB NO CACHE BOOL "")
set(SWIFT_BUILD_SOURCEKIT NO CACHE BOOL "")

# NOTE(compnerd) build with the compiler specified, not a just built compiler.
Expand Down
1 change: 0 additions & 1 deletion cmake/caches/Runtime-Android-armv7.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ set(SWIFT_INCLUDE_TESTS NO CACHE BOOL "")
set(SWIFT_INCLUDE_DOCS NO CACHE BOOL "")

# NOTE(compnerd) these are part of the toolchain, not the runtime.
set(SWIFT_BUILD_SYNTAXPARSERLIB NO CACHE BOOL "")
set(SWIFT_BUILD_SOURCEKIT NO CACHE BOOL "")

# NOTE(compnerd) build with the compiler specified, not a just built compiler.
Expand Down
1 change: 0 additions & 1 deletion cmake/caches/Runtime-Linux-x86_64.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ set(SWIFT_INCLUDE_TESTS NO CACHE BOOL "")
set(SWIFT_INCLUDE_DOCS NO CACHE BOOL "")

# NOTE(compnerd) these are part of the toolchain, not the runtime.
set(SWIFT_BUILD_SYNTAXPARSERLIB NO CACHE BOOL "")
set(SWIFT_BUILD_SOURCEKIT NO CACHE BOOL "")

# NOTE(compnerd) build with the compiler specified, not a just built compiler.
Expand Down
1 change: 0 additions & 1 deletion cmake/caches/Runtime-WASI-wasm32.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ set(SWIFT_INCLUDE_TOOLS NO CACHE BOOL "")
set(SWIFT_INCLUDE_TESTS TRUE CACHE BOOL "")
set(SWIFT_INCLUDE_DOCS NO CACHE BOOL "")

set(SWIFT_BUILD_SYNTAXPARSERLIB NO CACHE BOOL "")
set(SWIFT_BUILD_SOURCEKIT NO CACHE BOOL "")
set(SWIFT_ENABLE_SOURCEKIT_TESTS NO CACHE BOOL "")

Expand Down
1 change: 0 additions & 1 deletion cmake/caches/Runtime-Windows-aarch64.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ set(SWIFT_INCLUDE_TESTS NO CACHE BOOL "")
set(SWIFT_INCLUDE_DOCS NO CACHE BOOL "")

# NOTE(compnerd) these are part of the toolchain, not the runtime.
set(SWIFT_BUILD_SYNTAXPARSERLIB NO CACHE BOOL "")
set(SWIFT_BUILD_SOURCEKIT NO CACHE BOOL "")

# NOTE(compnerd) build with the compiler specified, not a just built compiler.
Expand Down
1 change: 0 additions & 1 deletion cmake/caches/Runtime-Windows-i686.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ set(SWIFT_INCLUDE_TESTS NO CACHE BOOL "")
set(SWIFT_INCLUDE_DOCS NO CACHE BOOL "")

# NOTE(compnerd) these are part of the toolchain, not the runtime.
set(SWIFT_BUILD_SYNTAXPARSERLIB NO CACHE BOOL "")
set(SWIFT_BUILD_SOURCEKIT NO CACHE BOOL "")

# NOTE(compnerd) build with the compiler specified, not a just built compiler.
Expand Down
1 change: 0 additions & 1 deletion cmake/caches/Runtime-Windows-x86_64.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ set(SWIFT_INCLUDE_TESTS NO CACHE BOOL "")
set(SWIFT_INCLUDE_DOCS NO CACHE BOOL "")

# NOTE(compnerd) these are part of the toolchain, not the runtime.
set(SWIFT_BUILD_SYNTAXPARSERLIB NO CACHE BOOL "")
set(SWIFT_BUILD_SOURCEKIT NO CACHE BOOL "")

# NOTE(compnerd) build with the compiler specified, not a just built compiler.
Expand Down
1 change: 0 additions & 1 deletion cmake/caches/Windows-arm64.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,6 @@ set(SWIFT_INSTALL_COMPONENTS
sourcekit-inproc
swift-remote-mirror
swift-remote-mirror-headers
parser-lib
CACHE STRING "")

set(LLVM_DISTRIBUTION_COMPONENTS
Expand Down
1 change: 0 additions & 1 deletion cmake/caches/Windows-x86_64.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,6 @@ set(SWIFT_INSTALL_COMPONENTS
sourcekit-inproc
swift-remote-mirror
swift-remote-mirror-headers
parser-lib
CACHE STRING "")

set(LLVM_DISTRIBUTION_COMPONENTS
Expand Down
3 changes: 1 addition & 2 deletions cmake/modules/SwiftComponents.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,12 @@
# Swift code.
# * toolchain-tools -- a subset of tools that we will install to the OSS toolchain.
# * testsuite-tools -- extra tools required to run the Swift testsuite.
# * parser-lib -- Build the syntax parser library used by SwiftSyntax.
# * static-mirror-lib -- Build the static mirror library used by SwiftStaticMirror.
# * toolchain-dev-tools -- install development tools useful in a shared toolchain
# * llvm-toolchain-dev-tools -- install LLVM development tools useful in a shared toolchain
# * dev -- headers and libraries required to use Swift compiler as a library.
set(_SWIFT_DEFINED_COMPONENTS
"autolink-driver;back-deployment;compiler;clang-builtin-headers;clang-resource-dir-symlink;clang-builtin-headers-in-clang-resource-dir;stdlib;stdlib-experimental;sdk-overlay;parser-lib;static-mirror-lib;editor-integration;tools;testsuite-tools;toolchain-tools;toolchain-dev-tools;llvm-toolchain-dev-tools;dev;license;sourcekit-xpc-service;sourcekit-inproc;swift-remote-mirror;swift-remote-mirror-headers")
"autolink-driver;back-deployment;compiler;clang-builtin-headers;clang-resource-dir-symlink;clang-builtin-headers-in-clang-resource-dir;stdlib;stdlib-experimental;sdk-overlay;static-mirror-lib;editor-integration;tools;testsuite-tools;toolchain-tools;toolchain-dev-tools;llvm-toolchain-dev-tools;dev;license;sourcekit-xpc-service;sourcekit-inproc;swift-remote-mirror;swift-remote-mirror-headers")

# The default install components include all of the defined components, except
# for the following exceptions.
Expand Down
3 changes: 1 addition & 2 deletions docs/OpenBSD.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ These options are:
* `--skip-build-clang-tools-extra` and `--skip-build-compiler-rt`: to ensure LLVM builds cleanly,
* `--extra-cmake-options=`
* `-DCMAKE_DISABLE_FIND_PACKAGE_Backtrace=TRUE,-DCMAKE_DISABLE_FIND_PACKAGE_LibXml2=TRUE,-DLLVM_VERSION_SUFFIX=''`: to ensure LLVM builds cleanly,
* `-DSWIFT_ENABLE_DISPATCH=FALSE,-DSWIFT_BUILD_SOURCEKIT=OFF,-DSWIFT_BUILD_SYNTAXPARSERLIB=OFF,-DSWIFT_ENABLE_EXPERIMENTAL_CONCURRENCY=OFF,-DSWIFT_IMPLICIT_CONCURRENCY_IMPORT=OFF,-DSWIFT_ENABLE_EXPERIMENTAL_DISTRIBUTED=OFF`: to ensure Swift does not attempt to build libdispatch, which is not yet supported on OpenBSD,
* `-DSWIFT_ENABLE_DISPATCH=FALSE,-DSWIFT_BUILD_SOURCEKIT=OFF,-DSWIFT_ENABLE_EXPERIMENTAL_CONCURRENCY=OFF,-DSWIFT_IMPLICIT_CONCURRENCY_IMPORT=OFF,-DSWIFT_ENABLE_EXPERIMENTAL_DISTRIBUTED=OFF`: to ensure Swift does not attempt to build libdispatch, which is not yet supported on OpenBSD,
* `-DSWIFT_USE_LINKER=lld`: to specify that `lld` should be used over `gold`,
* `-DCMAKE_INSTALL_DIR=/usr/local"`: to set the correct platform install directory.

Expand All @@ -84,7 +84,6 @@ $ ./utils/build-script \
-DLLVM_VERSION_SUFFIX='',\
-DSWIFT_ENABLE_DISPATCH=OFF,\
-DSWIFT_BUILD_SOURCEKIT=OFF,\
-DSWIFT_BUILD_SYNTAXPARSERLIB=OFF,\
-DSWIFT_ENABLE_EXPERIMENTAL_CONCURRENCY=OFF,\
-DSWIFT_IMPLICIT_CONCURRENCY_IMPORT=OFF,\
-DSWIFT_ENABLE_EXPERIMENTAL_DISTRIBUTED=OFF,\
Expand Down
77 changes: 0 additions & 77 deletions include/swift-c/SyntaxParser/SwiftSyntaxCDataTypes.h

This file was deleted.

Loading