-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Move pre-specializations of popular types away from the stdlib #1429
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 #1429
Conversation
@swift-ci Please test |
|
||
# swiftSwiftOnoneSupport does not depend on itself, | ||
# obviously. | ||
if("${name}" STREQUAL "swiftSwiftOnoneSupport") |
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.
Don't we want to do this block unconditionally, even when building non-optimized libraries?
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.
@gribozavr If we do this whole block unconditionally, then we introduce a link dependency on swiftSwiftOnoneSupport
even in Release builds, which results in this dylib being linked to the apps even though it is not used.
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.
@gribozavr But the two removal operations could be performed unconditionally, I agree. Because swiftSwiftOnoneSupport and stdlib do not depend on swiftSwiftOnoneSupport
under any circumstances.
@swiftix can you provide a pull request with the appropriate changes to the build scripts? |
@phausler Will do. |
…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 4%-5%.
9fd4c8e
to
8dff92a
Compare
@phausler I provided a PR you asked for. You can review it at swiftlang/swift-corelibs-foundation#266 |
@phausler Please let me know when you are ready to merge, so that we can do it in sync to avoid any broken builds. |
Move pre-specializations of popular types away from the stdlib. This saves 4%-5% of code size in libswiftCore.dylib.
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 4%-5%.
This PR fixes some problems discovered when trying to merge the PR #1392: