-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
CMake: Make SourceControl
a shared library
#8124
Conversation
* Make `SourceControl` a shared library. The library is shared across multiple other libraries (`Commands`, `PackageGraph` and `PackageLoading`), resulting in duplicate definitions in shared libraries. * Set rpath for macOS binaries, resulting in binaries ready to be used post-installation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, this should help reduce toolchain size. Have you tested across all platforms? My CMake is a pretty rusty but overall looks reasonable to me.
@swift-ci test |
I do not know if I have the right permissions to restart testing, but I believe the failure is a flake:
|
I only tested on macOS, but, outside of the |
I removed the rpath changes and refocused this change to be about the duplicate definitions across libraries. I am going to be doing other changes to dependent libraries to change the installation folder for shared libraries and I will submit another PR once the dependent libraries have been updated. |
@swift-ci test |
@swift-ci test windows |
SourceControl
a shared library
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please prepare the associated change for swift-installer-script and do a cross-repository test with a Windows toolchain build for this change as this will otherwise break the toolchain distribution on Windows.
`SourceControl` has been made a shared library in swiftlang/swift-package-manager#8124.
Here is the corresponding PR: swiftlang/swift-installer-scripts#354 |
Please test with following PRs: @swift-ci please build toolchain Windows platform |
Kicked off a test at swiftlang/swift#65907 |
`SourceControl` has been made a shared library in swiftlang/swift-package-manager#8124. (cherry picked from commit 345b660)
Motivation:
The current CMake build results in duplicate definitions across the resulting shared libraries, resulting in warnings on macOS at runtime.
Modifications:
SourceControl
a shared library. The library is shared across multiple other libraries (Commands
,PackageGraph
andPackageLoading
), resulting in duplicate definitions in shared libraries.Result:
No more warning at runtime with a macOS build.