Skip to content

Revert "SwiftSyntax: Teach SwiftSyntax to use SourceKitd to serialize syntax trees. (#14424)" #14456

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 1 commit into from
Feb 7, 2018
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
10 changes: 5 additions & 5 deletions cmake/modules/AddSwift.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ function(_add_variant_c_compile_flags)
else()
list(APPEND result "-DNDEBUG")
endif()

if(SWIFT_ENABLE_RUNTIME_FUNCTION_COUNTERS)
list(APPEND result "-DSWIFT_ENABLE_RUNTIME_FUNCTION_COUNTERS")
endif()
Expand Down Expand Up @@ -320,7 +320,7 @@ function(_add_variant_swift_compile_flags
if (SWIFT_ENABLE_GUARANTEED_NORMAL_ARGUMENTS)
list(APPEND result "-Xfrontend" "-enable-guaranteed-normal-arguments")
endif()

if(SWIFT_ENABLE_RUNTIME_FUNCTION_COUNTERS)
list(APPEND result "-D" "SWIFT_ENABLE_RUNTIME_FUNCTION_COUNTERS")
endif()
Expand Down Expand Up @@ -1605,7 +1605,7 @@ function(add_swift_library name)
if(SWIFTLIB_IS_SDK_OVERLAY)
list(APPEND swiftlib_swift_compile_flags_all "-Fsystem" "${SWIFT_SDK_${sdk}_PATH}/System/Library/PrivateFrameworks/")
endif()

if("${sdk}" STREQUAL "IOS_SIMULATOR")
if("${name}" STREQUAL "swiftMediaPlayer")
message("DISABLING AUTOLINK FOR swiftMediaPlayer")
Expand Down Expand Up @@ -1854,7 +1854,7 @@ function(add_swift_library name)
LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX}
RUNTIME DESTINATION bin)
swift_is_installing_component(dev is_installing)

if(NOT is_installing)
set_property(GLOBAL APPEND PROPERTY SWIFT_BUILDTREE_EXPORTS ${name})
else()
Expand Down Expand Up @@ -2177,7 +2177,7 @@ function(add_swift_host_tool executable)

swift_is_installing_component(${ADDSWIFTHOSTTOOL_SWIFT_COMPONENT}
is_installing)

if(NOT is_installing)
set_property(GLOBAL APPEND PROPERTY SWIFT_BUILDTREE_EXPORTS ${executable})
else()
Expand Down
1 change: 1 addition & 0 deletions test/SwiftSyntax/ParseFile.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// REQUIRES: executable_test
// REQUIRES: OS=macosx
// REQUIRES: objc_interop
// REQUIRES: rdar36740859

import Foundation
import StdlibUnittest
Expand Down
3 changes: 3 additions & 0 deletions test/SwiftSyntax/VisitorTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
// REQUIRES: OS=macosx
// REQUIRES: objc_interop

// FIXME: This test fails occassionally in CI with invalid json.
// REQUIRES: disabled

import StdlibUnittest
import Foundation
import SwiftSyntax
Expand Down
6 changes: 2 additions & 4 deletions test/lit.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,6 @@ else:
test_resource_dir = os.path.join(config.swift_lib_dir, 'swift')
resource_dir_opt = ""
stdlib_resource_dir_opt = resource_dir_opt
sourcekitd_framework_dir = config.swift_lib_dir
lit_config.note('Using resource dir: ' + test_resource_dir)

# Parse the variant triple.
Expand Down Expand Up @@ -671,13 +670,12 @@ if run_vendor == 'apple':
(run_cpu, run_os, run_vers, clang_mcp_opt))

config.target_build_swift = (
"%s %s %s -F %s -Xlinker -rpath -Xlinker %s %s %s %s %s -F %s -Xlinker -rpath -Xlinker %s"
"%s %s %s -F %s -Xlinker -rpath -Xlinker %s %s %s %s %s"
% (xcrun_prefix, config.swiftc, target_options,
extra_frameworks_dir, extra_frameworks_dir,
sdk_overlay_linker_opt, config.swift_test_options,
config.swift_driver_test_options,
swift_execution_tests_extra_flags, sourcekitd_framework_dir,
sourcekitd_framework_dir))
swift_execution_tests_extra_flags))
config.target_run = ""

if 'interpret' in lit_config.params:
Expand Down
12 changes: 2 additions & 10 deletions tools/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,27 +16,19 @@ add_swift_tool_subdirectory(swift-api-digester)
add_swift_tool_subdirectory(swift-syntax-test)
add_swift_tool_subdirectory(swift-refactor)

if (SWIFT_BUILD_SOURCEKIT AND SWIFT_BUILD_STDLIB AND SWIFT_BUILD_SDK_OVERLAY)
set(BUILD_SOURCEKIT_SWIFT_CLIENT TRUE)
else()
set(BUILD_SOURCEKIT_SWIFT_CLIENT FALSE)
endif()

if(SWIFT_BUILD_SOURCEKIT)
add_swift_tool_subdirectory(SourceKit)
if(BUILD_SOURCEKIT_SWIFT_CLIENT)
add_subdirectory(SwiftSourceKitClient)
endif()
endif()


if(SWIFT_HOST_VARIANT STREQUAL "macosx")
# Only build Darwin-specific tools when deploying to OS X.
add_swift_tool_subdirectory(swift-stdlib-tool)

# SwiftSyntax depends on both the standard library (because it's a
# Swift module), and the SDK overlays (because it depends on Foundation).
# Ensure we only build SwiftSyntax when we're building both.
if(BUILD_SOURCEKIT_SWIFT_CLIENT)
if(SWIFT_BUILD_STDLIB AND SWIFT_BUILD_SDK_OVERLAY)
add_subdirectory(SwiftSyntax)
endif()
endif()
Expand Down
18 changes: 0 additions & 18 deletions tools/SwiftSourceKitClient/CMakeLists.txt

This file was deleted.

28 changes: 0 additions & 28 deletions tools/SwiftSourceKitClient/SourceKitdClient.swift

This file was deleted.

154 changes: 0 additions & 154 deletions tools/SwiftSourceKitClient/SourceKitdRequest.swift

This file was deleted.

Loading