Skip to content

[6.0 🍒][CMake] Add a dependency on 'libSwiftScan' for 'swiftCore' and its embedded variants #77622

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

Closed
Closed
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
8 changes: 4 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1430,6 +1430,10 @@ if(SWIFT_ENABLE_DISPATCH)
endif()

# Add all of the subdirectories, where we actually do work.
add_subdirectory(include)
if(SWIFT_INCLUDE_TOOLS)
add_subdirectory(lib)
endif()

###############
# PLEASE READ #
Expand Down Expand Up @@ -1482,11 +1486,7 @@ if(SWIFT_INCLUDE_APINOTES)
add_subdirectory(apinotes)
endif()

add_subdirectory(include)

if(SWIFT_INCLUDE_TOOLS)
add_subdirectory(lib)

add_subdirectory(SwiftCompilerSources)

# Always include this after including stdlib/!
Expand Down
1 change: 1 addition & 0 deletions lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ add_subdirectory(StaticMirror)
add_subdirectory(SymbolGraphGen)
add_subdirectory(SwiftSyntax)
add_subdirectory(Threading)
add_subdirectory(Tooling)

if(SWIFT_BUILD_EXTERNAL_GENERIC_METADATA_BUILDER)
add_subdirectory(ExternalGenericMetadataBuilder)
Expand Down
1 change: 1 addition & 0 deletions lib/Tooling/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
add_swift_tool_subdirectory(libSwiftScan)
7 changes: 7 additions & 0 deletions stdlib/public/core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -398,12 +398,18 @@ if(BOOTSTRAPPING_MODE STREQUAL "BOOTSTRAPPING")
BOOTSTRAPPING 1)
endif()

set(tooling_stdlib_deps)
if(TARGET libSwiftScan)
list(APPEND tooling_stdlib_deps libSwiftScan)
endif()

add_swift_target_library(swiftCore
${SWIFT_STDLIB_LIBRARY_BUILD_TYPES}
${swiftCore_common_options}
${compile_flags_for_final_build}
FILE_DEPENDS
${swiftCore_common_dependencies}
DEPENDS ${tooling_stdlib_deps}
INSTALL_IN_COMPONENT
stdlib
MACCATALYST_BUILD_FLAVOR
Expand Down Expand Up @@ -444,6 +450,7 @@ if(SWIFT_SHOULD_BUILD_EMBEDDED_STDLIB)
SDK "embedded"
ARCHITECTURE "${arch}"
FILE_DEPENDS ${swiftCore_common_dependencies}
DEPENDS ${tooling_stdlib_deps}
INSTALL_IN_COMPONENT stdlib
)
add_dependencies(embedded-stdlib embedded-stdlib-${mod})
Expand Down
1 change: 0 additions & 1 deletion tools/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ add_swift_tool_subdirectory(swift-def-to-strings-converter)
add_swift_tool_subdirectory(swift-serialize-diagnostics)
add_swift_tool_subdirectory(swift-ast-script)
add_swift_tool_subdirectory(swift-refactor)
add_swift_tool_subdirectory(libSwiftScan)
add_swift_tool_subdirectory(libStaticMirror)
add_swift_tool_subdirectory(libMockPlugin)
add_swift_tool_subdirectory(swift-plugin-server)
Expand Down