mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
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.