Skip to content

[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

Merged
merged 1 commit into from
Dec 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@
// 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. 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.

// The linker uses a specially formatted symbol to do the back deployment:
// $ld$previous$<install-name>$<compatibility-version>$<platform>$<start-version>$<end-version>$<symbol-name>$
// compatibility-version and symbol-name are left off to apply to all library versions and symbols.
Expand All @@ -49,25 +55,25 @@
RPATH_PREVIOUS_DIRECTIVE_IMPL(SWIFT_TARGET_LIBRARY_NAME, platform, startVersion, endVersion)

#if TARGET_OS_OSX || TARGET_OS_MACCATALYST
RPATH_PREVIOUS_DIRECTIVE(PLATFORM_MACOS, 10.15, 12.0)
RPATH_PREVIOUS_DIRECTIVE(PLATFORM_MACOS, 10.9, 12.0)
RPATH_PREVIOUS_DIRECTIVE(PLATFORM_MACCATALYST, 13.1, 15.0)
#elif TARGET_OS_IOS && !TARGET_OS_VISION
#if TARGET_OS_SIMULATOR
RPATH_PREVIOUS_DIRECTIVE(PLATFORM_IOSSIMULATOR, 13.0, 15.0)
RPATH_PREVIOUS_DIRECTIVE(PLATFORM_IOSSIMULATOR, 7.0, 15.0)
#else
RPATH_PREVIOUS_DIRECTIVE(PLATFORM_IOS, 13.0, 15.0)
RPATH_PREVIOUS_DIRECTIVE(PLATFORM_IOS, 7.0, 15.0)
#endif
#elif TARGET_OS_WATCH
#if TARGET_OS_SIMULATOR
RPATH_PREVIOUS_DIRECTIVE(PLATFORM_WATCHOSSIMULATOR, 6.0, 8.0)
RPATH_PREVIOUS_DIRECTIVE(PLATFORM_WATCHOSSIMULATOR, 2.0, 8.0)
#else
RPATH_PREVIOUS_DIRECTIVE(PLATFORM_WATCHOS, 6.0, 8.0)
RPATH_PREVIOUS_DIRECTIVE(PLATFORM_WATCHOS, 2.0, 8.0)
#endif
#elif TARGET_OS_TV
#if TARGET_OS_SIMULATOR
RPATH_PREVIOUS_DIRECTIVE(PLATFORM_TVOSSIMULATOR, 13.0, 15.0)
RPATH_PREVIOUS_DIRECTIVE(PLATFORM_TVOSSIMULATOR, 9.0, 15.0)
#else
RPATH_PREVIOUS_DIRECTIVE(PLATFORM_TVOS, 13.0, 15.0)
RPATH_PREVIOUS_DIRECTIVE(PLATFORM_TVOS, 9.0, 15.0)
#endif
#endif
// Concurrency wasn't supported as an embedded library in any other OS, so no need to create back deployment
Expand Down
2 changes: 1 addition & 1 deletion test/abi/Inputs/macOS/arm64/concurrency/baseline
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
$ld$previous$@rpath/libswift_Concurrency.dylib$$1$10.15$12.0$$
$ld$previous$@rpath/libswift_Concurrency.dylib$$1$10.9$12.0$$
$ld$previous$@rpath/libswift_Concurrency.dylib$$6$13.1$15.0$$
_$s13AsyncIteratorSciTl
_$s7ElementScITl
Expand Down
2 changes: 1 addition & 1 deletion test/abi/Inputs/macOS/arm64/concurrency/baseline-asserts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
$ld$previous$@rpath/libswift_Concurrency.dylib$$1$10.15$12.0$$
$ld$previous$@rpath/libswift_Concurrency.dylib$$1$10.9$12.0$$
$ld$previous$@rpath/libswift_Concurrency.dylib$$6$13.1$15.0$$
_$s13AsyncIteratorSciTl
_$s7ElementScITl
Expand Down
2 changes: 1 addition & 1 deletion test/abi/Inputs/macOS/x86_64/concurrency/baseline
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
$ld$previous$@rpath/libswift_Concurrency.dylib$$1$10.15$12.0$$
$ld$previous$@rpath/libswift_Concurrency.dylib$$1$10.9$12.0$$
$ld$previous$@rpath/libswift_Concurrency.dylib$$6$13.1$15.0$$
_$s13AsyncIteratorSciTl
_$s7ElementScITl
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
$ld$previous$@rpath/libswift_Concurrency.dylib$$1$10.15$12.0$$
$ld$previous$@rpath/libswift_Concurrency.dylib$$1$10.9$12.0$$
$ld$previous$@rpath/libswift_Concurrency.dylib$$6$13.1$15.0$$
_$s13AsyncIteratorSciTl
_$s7ElementScITl
Expand Down