-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[Concurrency] Fix start of version ranges in install name magic symbols. #77980
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
Conversation
Oh, yuck. I really wish that if a library has |
@@ -34,6 +34,11 @@ | |||
// Xcode inserting a runpath search path of /usr/lib/swift based on the deployment target being less than | |||
// SupportedTargets[target][SwiftConcurrencyMinimumDeploymentTarget] in SDKSettings.plist. | |||
|
|||
// Note: even though the embedded Concurrency library is only supported back to |
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.
// Clients can back deploy to OS versions that predate Concurrency as an embedded library, and conditionally use
// it behind an #availability check. Such clients will still need to link the embedded library instead of the OS version.
// To support that, set the start version to Swift's first supported versions: macOS (née OS X) 10.9, iOS 7.0,
// watchOS 2.0, tvOS 9.0 rather than Concurrency's first supported versions listed above.
RPATH_PREVIOUS_DIRECTIVE(PLATFORM_MACOS, 10.15, 12.0) | ||
RPATH_PREVIOUS_DIRECTIVE(PLATFORM_MACCATALYST, 13.1, 15.0) | ||
RPATH_PREVIOUS_DIRECTIVE(PLATFORM_MACOS, 10.9, 12.0) | ||
RPATH_PREVIOUS_DIRECTIVE(PLATFORM_MACCATALYST, 7.0, 15.0) |
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.
The first version of Mac Catalyst was 13.1, so this one should stay the same.
#endif | ||
#elif TARGET_OS_TV | ||
#if TARGET_OS_SIMULATOR | ||
RPATH_PREVIOUS_DIRECTIVE(PLATFORM_TVOSSIMULATOR, 13.0, 15.0) | ||
RPATH_PREVIOUS_DIRECTIVE(PLATFORM_TVOSSIMULATOR, 2.0, 15.0) |
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.
This should be 9.0, the first version of tvOS.
#else | ||
RPATH_PREVIOUS_DIRECTIVE(PLATFORM_TVOS, 13.0, 15.0) | ||
RPATH_PREVIOUS_DIRECTIVE(PLATFORM_TVOS, 2.0, 15.0) |
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.
9.0
8bc6c05
to
67eab53
Compare
@@ -34,6 +34,11 @@ | |||
// Xcode inserting a runpath search path of /usr/lib/swift based on the deployment target being less than | |||
// SupportedTargets[target][SwiftConcurrencyMinimumDeploymentTarget] in SDKSettings.plist. | |||
|
|||
// Clients can back deploy to OS versions that predate Concurrency as an embedded library, and conditionally use | |||
// it behind an #availability check. Such clients will still need to link the embedded library instead of the OS version. |
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.
Mega nitpick: I should've typed this out in the actual header. Can you try to make the right margin roughly line up with the previous paragraph? My lines were just a little too long.
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.
Done.
67eab53
to
82522a8
Compare
@swift-ci please smoke test |
Infrastructure issue and unrelated test failure, trying again. |
@swift-ci please smoke test |
The magic symbols specify a version range where clients should reference a @rpath relative path to libswift_Concurrency.dylib instead of the standard absolute path. This version range started at macOS 10.15 and aligned versions, which is the oldest target supported by Concurrency. However, clients that use Concurrency can target earlier OSes as long as they availability-check their use of Concurrency. When targeting something earlier than 10.15, they'd reference the absolute path, then fail to find the back-deployment Concurrency runtime on OS versions that need it. Fix this by setting the start of the range to macOS 10.9 and aligned, which is the oldest target supported by Swift. rdar://140476764
82522a8
to
e727252
Compare
These symbols show up in the baseline for the ABI tests, need to adjust them too. |
@swift-ci please smoke test |
The magic symbols specify a version range where clients should reference a @rpath relative path to libswift_Concurrency.dylib instead of the standard absolute path. This version range started at macOS 10.15 and aligned versions, which is the oldest target supported by Concurrency. However, clients that use Concurrency can target earlier OSes as long as they availability-check their use of Concurrency. When targeting something earlier than 10.15, they'd reference the absolute path, then fail to find the back-deployment Concurrency runtime on OS versions that need it.
Fix this by setting the start of the range to macOS 10.9 and aligned, which is the oldest target supported by Swift.
rdar://140476764