-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Move pre-specializations of popular types away from the stdlib #1392
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
Move pre-specializations of popular types away from the stdlib #1392
Conversation
@swift-ci Please test |
@@ -0,0 +1,6 @@ | |||
add_swift_library(swiftSwiftOnoneSupport SHARED IS_STDLIB |
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.
For consistency, this directory should be named 'SwiftOnoneSupport'.
@gribozavr Thanks for the review, Dmitri! I've incorporated your suggested changes and will push-force the corrected version on my branch. BTW, do you have any idea why OS X tests pass and Linux tests fail? Do we test PM only on Linux? |
@swiftix It looks like we run swiftpm tests on OS X (https://ci.swift.org/job/swift-PR-osx/173/console#console-section-9). Maybe that is a smaller set of tests? I don't know. |
eb009fa
to
cdd38dd
Compare
@swift-ci Please test |
@gribozavr Yes, indeed. We run PM tests on OS X. I wonder if may be it is related to using different linkers on OS X and Linux. Or may be auto-linking works differently? |
Autolinking definitely uses a different mechanism. On OS X, we are using a linker feature. On Linux, we emit the information into a special section, and then, when linking with |
cdd38dd
to
899a4a1
Compare
…ary. Pre-specializations were only used by Onone builds, but were kept inside the standard library dylyb anyways. This commit moves all the pre-specializations into a dedicated Swift module and a dynamic library, which are only used by Onone builds. This reduces the code size of libswiftCore.dylib by 5%.
899a4a1
to
4d4c2cd
Compare
@swift-ci Please test |
This is currently blocked by the following issue: swiftlang/swift-corelibs-xctest@6a1e783 |
@swift-ci Please test |
Move pre-specializations of popular types away from the stdlib to reduce the stdlib code size.
Pre-specializations were only used by Onone builds, but were kept inside the standard library dylyb anyways. This commit moves all the pre-specializations into a dedicated Swift module and a dynamic library, which are only used by Onone builds.
This reduces the code size of libswiftCore.dylib by 5%.