Skip to content

Install swift-system into the toolchain during CMake build's install action #953

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 22, 2021

Conversation

artemcm
Copy link
Contributor

@artemcm artemcm commented Dec 21, 2021

#915 added a CMake dependency on swift-system.
Since then, the CMake build of the driver builds swift-system, but when the install action is triggered, the dependency's module and shared library are not installed into the toolchain. As a result, built toolchains are unable to invoke swift-driver due to the missing dylib.

This ensures that much like other driver dependencies (TSC, ArgumentParser), we also install SwiftSystem.

Resolves rdar://86754758

swiftlang#915 added a CMake dependency on swift-system.
Since then, the CMake build of the driver builds swift-system, but when the `install` action is triggered, the dependency's module and shared library are not installed into the toolchain. As a result, built toolchains are unable to invoke swift-driver due to the missing dylib.

This ensures that much like other driver dependencies (TSC, ArgumentParser), we also install SwiftSystem.

Resolves rdar://86754758
@artemcm
Copy link
Contributor Author

artemcm commented Dec 21, 2021

@swift-ci please test

# swift-tools-support-core: TSCUtility.swiftmodule, TSCLibc.swiftmodule, TSCBasic.swiftmodule
# swift-argument-parser: ArgumentParser.swiftmodule (disabled until needed)
# swift-system: SystemPackage.swiftmodule
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is the swiftmodule required? Do you expect to be building against the installed version of swift-driver?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Potential clients of libSwiftDriver would need it if they try to use the toolchain's driver library instead of depending on it as a package.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think its an interesting question to understand who such clients are and if static vs dynamic linking of the dependencies is the right strategy.

Copy link
Contributor

@tomerd tomerd Dec 22, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for now 👍 to unblock the nightly toolchain tho

@artemcm artemcm merged commit 21f12f3 into swiftlang:main Dec 22, 2021
@@ -333,10 +334,17 @@ def install_libraries(args, build_dir, universal_lib_dir, toolchain_lib_dir, tar
install_library(args, build_dir, package_subpath, lib,
universal_lib_dir, toolchain_lib_dir, 'swift-tools-support-core', targets)

# Instal the swift-system shared library into the toolchain lib
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo copied 3 times: instal

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.

4 participants