Skip to content

Revert "Revert "Revert "swift-lang: shuffle the source directory structure (N…" #29976

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 20, 2020
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
9 changes: 0 additions & 9 deletions cmake/modules/AddSwift.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -1293,11 +1293,6 @@ function(_add_swift_target_library_single target name)
-libc;${SWIFT_STDLIB_MSVC_RUNTIME_LIBRARY})
endif()

if(sourcekitd IN_LIST SWIFTLIB_SINGLE_DEPENDS)
list(REMOVE_ITEM SWIFTLIB_SINGLE_DEPENDS sourcekitd)
set(SWIFTLIB_SINGLE_INJECT_SOURCEKITD_DEPENDENCY TRUE)
endif()

# FIXME: don't actually depend on the libraries in SWIFTLIB_SINGLE_LINK_LIBRARIES,
# just any swiftmodule files that are associated with them.
handle_swift_sources(
Expand All @@ -1323,10 +1318,6 @@ function(_add_swift_target_library_single target name)
${embed_bitcode_arg}
INSTALL_IN_COMPONENT "${SWIFTLIB_SINGLE_INSTALL_IN_COMPONENT}"
MACCATALYST_BUILD_FLAVOR "${SWIFTLIB_SINGLE_MACCATALYST_BUILD_FLAVOR}")
if(SWIFTLIB_SINGLE_INJECT_SOURCEKITD_DEPENDENCY)
add_dependencies(${swift_object_dependency_target}
sourcekitd)
endif()
add_swift_source_group("${SWIFTLIB_SINGLE_EXTERNAL_SOURCES}")

# If there were any swift sources, then a .swiftmodule may have been created.
Expand Down
8 changes: 0 additions & 8 deletions stdlib/tools/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
if(SWIFT_BUILD_DYNAMIC_STDLIB AND SWIFT_INCLUDE_TESTS)
add_subdirectory(swift-reflection-test)
endif()
if(SWIFT_BUILD_SDK_OVERLAY)
include(CheckIncludeFiles)
check_include_files("xpc/xpc.h" HAVE_XPC_H)

if(SWIFT_BUILD_SOURCEKIT AND CMAKE_SYSTEM_NAME STREQUAL Darwin AND HAVE_XPC_H)
add_subdirectory(swift-lang)
endif()
endif()
28 changes: 0 additions & 28 deletions stdlib/tools/swift-lang/CMakeLists.txt

This file was deleted.

1 change: 1 addition & 0 deletions tools/SourceKit/tools/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ if(LibEdit_FOUND AND LibEdit_HAS_UNICODE)
add_swift_tool_subdirectory(sourcekitd-repl)
endif()
add_swift_tool_subdirectory(complete-test)
add_subdirectory(swift-lang)
31 changes: 31 additions & 0 deletions tools/SourceKit/tools/swift-lang/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
if(NOT SWIFT_SOURCEKIT_USE_INPROC_LIBRARY AND SWIFT_BUILD_STDLIB AND SWIFT_BUILD_SDK_OVERLAY)
# The build type of swiftlang should agree with stdlib
# This setting could avoid us adding additional search paths when building
# executables using SwiftLang.
set(SWIFT_LANG_LIBRARY_BUILD_TYPES)
if(SWIFT_BUILD_DYNAMIC_STDLIB)
list(APPEND SWIFT_LANG_LIBRARY_BUILD_TYPES SHARED)
endif()
if(SWIFT_BUILD_STATIC_STDLIB)
list(APPEND SWIFT_LANG_LIBRARY_BUILD_TYPES STATIC)
endif()

add_swift_target_library(swiftSwiftLang ${SWIFT_LANG_LIBRARY_BUILD_TYPES}
SwiftLang.swift
SourceKitdClient.swift
SourceKitdRequest.swift
SourceKitdResponse.swift
SourceKitdUID.swift

GYB_SOURCES
UIDs.swift.gyb

DEPENDS sourcekitd-test
SWIFT_MODULE_DEPENDS_OSX Darwin Foundation
PRIVATE_LINK_LIBRARIES sourcekitd
SWIFT_COMPILE_FLAGS -F${SWIFT_LIBRARY_OUTPUT_INTDIR}
INSTALL_IN_COMPONENT sourcekit-xpc-service
DARWIN_INSTALL_NAME_DIR "@rpath"
TARGET_SDKS ${SOURCEKIT_DEFAULT_TARGET_SDK}
IS_STDLIB)
endif()