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

Conversation

drodriguez
Copy link
Contributor

While add_swift_target_library has code to add a dependency from the install component to the target, similar code was missing from add_swift_target_library_single, probably because add_swift_target_library calls add_swift_target_library_single, so the extra dependency is not necessary.

However, there's usages of add_swift_target_library_single outside add_swift_target_library which were creating targets that were not dependencies of their install components. Some of those cases are the embedded stdlib targets, which are installed as part of the stdlib component.

It normally does not matter when using build-script, because those targets are build as part of all, but it does matter if one is using CMake/Ninja directly or in cases where build-script is not used. Trying to use targets like install-stdlib will had missed building the embedded stdlib, and failed the installation.

…nent

While `add_swift_target_library` has code to add a dependency from the
install component to the target, similar code was missing from
`add_swift_target_library_single`, probably because
`add_swift_target_library` calls `add_swift_target_library_single`, so
the extra dependency is not necessary.

However, there's usages of `add_swift_target_library_single` outside
`add_swift_target_library` which were creating targets that were not
dependencies of their install components. Some of  those cases are the
embedded stdlib targets, which are installed as part of the `stdlib`
component.

It normally does not matter when using `build-script`, because those
targets are build as part of `all`, but it does matter if one is using
CMake/Ninja directly or in cases where `build-script` is not used.
Trying to use targets like `install-stdlib` will had missed building the
embedded stdlib, and failed the installation.
@drodriguez drodriguez requested a review from a team as a code owner December 15, 2023 10:37
@drodriguez
Copy link
Contributor Author

@swift-ci please test

@drodriguez drodriguez merged commit a7a8ba1 into swiftlang:main Dec 16, 2023
@drodriguez drodriguez deleted the astls-missing-dep branch December 16, 2023 09:01
meg-gupta pushed a commit to meg-gupta/swift that referenced this pull request Dec 21, 2023
…nent (swiftlang#70490)

While `add_swift_target_library` has code to add a dependency from the
install component to the target, similar code was missing from
`add_swift_target_library_single`, probably because
`add_swift_target_library` calls `add_swift_target_library_single`, so
the extra dependency is not necessary.

However, there's usages of `add_swift_target_library_single` outside
`add_swift_target_library` which were creating targets that were not
dependencies of their install components. Some of  those cases are the
embedded stdlib targets, which are installed as part of the `stdlib`
component.

It normally does not matter when using `build-script`, because those
targets are build as part of `all`, but it does matter if one is using
CMake/Ninja directly or in cases where `build-script` is not used.
Trying to use targets like `install-stdlib` will had missed building the
embedded stdlib, and failed the installation.
Catfish-Man pushed a commit to Catfish-Man/swift that referenced this pull request Jan 19, 2024
…nent (swiftlang#70490)

While `add_swift_target_library` has code to add a dependency from the
install component to the target, similar code was missing from
`add_swift_target_library_single`, probably because
`add_swift_target_library` calls `add_swift_target_library_single`, so
the extra dependency is not necessary.

However, there's usages of `add_swift_target_library_single` outside
`add_swift_target_library` which were creating targets that were not
dependencies of their install components. Some of  those cases are the
embedded stdlib targets, which are installed as part of the `stdlib`
component.

It normally does not matter when using `build-script`, because those
targets are build as part of `all`, but it does matter if one is using
CMake/Ninja directly or in cases where `build-script` is not used.
Trying to use targets like `install-stdlib` will had missed building the
embedded stdlib, and failed the installation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant