Skip to content

Always weak-link symbols from the concurrency library when back-deploying #40007

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
Nov 2, 2021

Conversation

DougGregor
Copy link
Member

This allows applications that back-deploy but only use concurrency in
newer code to load and execute properly, even when the concurrency library
is not available. Fixes rdar://84877644.

Pair-programmed with @etcwilde

…ying

This allows applications that back-deploy but only use concurrency in
newer code to load and execute properly, even when the concurrency library
is not available. Fixes rdar://84877644.
@DougGregor
Copy link
Member Author

@swift-ci please test

@etcwilde
Copy link
Member

etcwilde commented Nov 1, 2021

Looks good, now to figure out why my computer is still making $sScP8rawValues5UInt8Vvg strong.

@swift-ci
Copy link
Contributor

swift-ci commented Nov 2, 2021

Build failed
Swift Test Linux Platform
Git Sha - d5175ab

@etcwilde
Copy link
Member

etcwilde commented Nov 2, 2021

@swift-ci please clean test linux platform

@etcwilde
Copy link
Member

etcwilde commented Nov 2, 2021

Linux errors were all issues with the compiled module being created by an older version of the compiler and being unable to import Dispatch.

Copy link
Member

@etcwilde etcwilde left a comment

Choose a reason for hiding this comment

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

Did a complete clean rebuild and now things are working. I've verified by inspecting the IR in addition to generating a binary and running nm -um against it.

                 (undefined) weak external _$sScP8rawValues5UInt8Vvg (from libswift_Concurrency)
                 (undefined) weak external _$sScPMa (from libswift_Concurrency)
                 (undefined) weak external _$sScPMn (from libswift_Concurrency)
                 (undefined) weak external _$sScTss5NeverORs_rlE5valuexvg (from libswift_Concurrency)
                 (undefined) weak external _$sScTss5NeverORs_rlE5valuexvgTu (from libswift_Concurrency)
                 (undefined) weak external _swift_async_extendedFramePointerFlags (from libswift_Concurrency)
                 (undefined) weak external _swift_task_alloc (from libswift_Concurrency)
                 (undefined) weak external _swift_task_create (from libswift_Concurrency)
                 (undefined) weak external _swift_task_dealloc (from libswift_Concurrency)

LGTM.

@DougGregor DougGregor merged commit 2ad0eb7 into swiftlang:main Nov 2, 2021
@DougGregor DougGregor deleted the back-deploy-concurrency-weak branch November 3, 2021 22:07
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.

3 participants