Skip to content

[CMake] Add dep in add_swift_target_library_single from install component #70490

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
Dec 16, 2023
Merged
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
5 changes: 5 additions & 0 deletions stdlib/cmake/modules/AddSwiftStdlib.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -1043,6 +1043,7 @@ function(add_swift_target_library_single target name)
add_custom_target("${target}"
DEPENDS
"${swift_module_dependency_target}")
add_dependencies("${install_in_component}" "${target}")

return()
endif()
Expand Down Expand Up @@ -1076,6 +1077,7 @@ function(add_swift_target_library_single target name)
if (SWIFTLIB_SINGLE_ONLY_SWIFTMODULE)
add_custom_target("${target}"
DEPENDS "${swift_module_dependency_target}")
add_dependencies("${install_in_component}" "${target}")
return()
endif()

Expand All @@ -1084,6 +1086,9 @@ function(add_swift_target_library_single target name)
${SWIFTLIB_SINGLE_EXTERNAL_SOURCES}
${INCORPORATED_OBJECT_LIBRARIES_EXPRESSIONS}
${SWIFTLIB_SINGLE_XCODE_WORKAROUND_SOURCES})
if (NOT SWIFTLIB_SINGLE_OBJECT_LIBRARY)
add_dependencies("${install_in_component}" "${target}")
endif()
# NOTE: always inject the LLVMSupport directory before anything else. We want
# to ensure that the runtime is built with our local copy of LLVMSupport
target_include_directories(${target} BEFORE PRIVATE
Expand Down