Skip to content

[CMake] Add a dependency on 'libSwiftScan' for 'swiftCore' #77541

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 12, 2024
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
3 changes: 0 additions & 3 deletions stdlib/public/Platform/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,6 @@ if(SWIFT_SHOULD_BUILD_EMBEDDED_STDLIB)

add_custom_target(embedded-darwin)
add_dependencies(embedded-libraries embedded-darwin)

set_property(GLOBAL APPEND PROPERTY JOB_POOLS one_job=1)
foreach(entry ${EMBEDDED_STDLIB_TARGET_TRIPLES})
string(REGEX REPLACE "[ \t]+" ";" list "${entry}")
list(GET list 0 arch)
Expand Down Expand Up @@ -127,7 +125,6 @@ if(SWIFT_SHOULD_BUILD_EMBEDDED_STDLIB)
INSTALL_IN_COMPONENT stdlib
)
add_dependencies(embedded-darwin embedded-darwin-${mod})
set_property(TARGET embedded-darwin-${mod} PROPERTY JOB_POOL_COMPILE one_job)
endforeach()
endif()

Expand Down
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 @@ -446,6 +452,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