Skip to content

Commit 9284822

Browse files
authored
Merge pull request #29976 from apple/revert-29941-it-just-works
Revert "Revert "Revert "swift-lang: shuffle the source directory structure (N…"
2 parents 1b07853 + bfd0de4 commit 9284822

File tree

11 files changed

+32
-45
lines changed

11 files changed

+32
-45
lines changed

cmake/modules/AddSwift.cmake

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1293,11 +1293,6 @@ function(_add_swift_target_library_single target name)
12931293
-libc;${SWIFT_STDLIB_MSVC_RUNTIME_LIBRARY})
12941294
endif()
12951295

1296-
if(sourcekitd IN_LIST SWIFTLIB_SINGLE_DEPENDS)
1297-
list(REMOVE_ITEM SWIFTLIB_SINGLE_DEPENDS sourcekitd)
1298-
set(SWIFTLIB_SINGLE_INJECT_SOURCEKITD_DEPENDENCY TRUE)
1299-
endif()
1300-
13011296
# FIXME: don't actually depend on the libraries in SWIFTLIB_SINGLE_LINK_LIBRARIES,
13021297
# just any swiftmodule files that are associated with them.
13031298
handle_swift_sources(
@@ -1323,10 +1318,6 @@ function(_add_swift_target_library_single target name)
13231318
${embed_bitcode_arg}
13241319
INSTALL_IN_COMPONENT "${SWIFTLIB_SINGLE_INSTALL_IN_COMPONENT}"
13251320
MACCATALYST_BUILD_FLAVOR "${SWIFTLIB_SINGLE_MACCATALYST_BUILD_FLAVOR}")
1326-
if(SWIFTLIB_SINGLE_INJECT_SOURCEKITD_DEPENDENCY)
1327-
add_dependencies(${swift_object_dependency_target}
1328-
sourcekitd)
1329-
endif()
13301321
add_swift_source_group("${SWIFTLIB_SINGLE_EXTERNAL_SOURCES}")
13311322

13321323
# If there were any swift sources, then a .swiftmodule may have been created.

stdlib/tools/CMakeLists.txt

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
11
if(SWIFT_BUILD_DYNAMIC_STDLIB AND SWIFT_INCLUDE_TESTS)
22
add_subdirectory(swift-reflection-test)
33
endif()
4-
if(SWIFT_BUILD_SDK_OVERLAY)
5-
include(CheckIncludeFiles)
6-
check_include_files("xpc/xpc.h" HAVE_XPC_H)
7-
8-
if(SWIFT_BUILD_SOURCEKIT AND CMAKE_SYSTEM_NAME STREQUAL Darwin AND HAVE_XPC_H)
9-
add_subdirectory(swift-lang)
10-
endif()
11-
endif()

stdlib/tools/swift-lang/CMakeLists.txt

Lines changed: 0 additions & 28 deletions
This file was deleted.

tools/SourceKit/tools/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@ if(LibEdit_FOUND AND LibEdit_HAS_UNICODE)
1010
add_swift_tool_subdirectory(sourcekitd-repl)
1111
endif()
1212
add_swift_tool_subdirectory(complete-test)
13+
add_subdirectory(swift-lang)
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
if(NOT SWIFT_SOURCEKIT_USE_INPROC_LIBRARY AND SWIFT_BUILD_STDLIB AND SWIFT_BUILD_SDK_OVERLAY)
2+
# The build type of swiftlang should agree with stdlib
3+
# This setting could avoid us adding additional search paths when building
4+
# executables using SwiftLang.
5+
set(SWIFT_LANG_LIBRARY_BUILD_TYPES)
6+
if(SWIFT_BUILD_DYNAMIC_STDLIB)
7+
list(APPEND SWIFT_LANG_LIBRARY_BUILD_TYPES SHARED)
8+
endif()
9+
if(SWIFT_BUILD_STATIC_STDLIB)
10+
list(APPEND SWIFT_LANG_LIBRARY_BUILD_TYPES STATIC)
11+
endif()
12+
13+
add_swift_target_library(swiftSwiftLang ${SWIFT_LANG_LIBRARY_BUILD_TYPES}
14+
SwiftLang.swift
15+
SourceKitdClient.swift
16+
SourceKitdRequest.swift
17+
SourceKitdResponse.swift
18+
SourceKitdUID.swift
19+
20+
GYB_SOURCES
21+
UIDs.swift.gyb
22+
23+
DEPENDS sourcekitd-test
24+
SWIFT_MODULE_DEPENDS_OSX Darwin Foundation
25+
PRIVATE_LINK_LIBRARIES sourcekitd
26+
SWIFT_COMPILE_FLAGS -F${SWIFT_LIBRARY_OUTPUT_INTDIR}
27+
INSTALL_IN_COMPONENT sourcekit-xpc-service
28+
DARWIN_INSTALL_NAME_DIR "@rpath"
29+
TARGET_SDKS ${SOURCEKIT_DEFAULT_TARGET_SDK}
30+
IS_STDLIB)
31+
endif()

0 commit comments

Comments
 (0)