Skip to content

[overlay] magic-symbols-for-install-name conflicts with @_originallyDefinedIn #71864

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

ian-twilightcoder
Copy link
Contributor

@ian-twilightcoder ian-twilightcoder commented Feb 24, 2024

The _Builtin_float interfaces were defined in $@rpath/lib/libswiftDarwin.dylib until macOS 10.14.4 and then in usr/lib/swift/libswiftDarwin.dylib after that. We were trying to use magic-symbols-for-install-name for the first one and @_originallyDefinedIn for the second one. However, @_originallyDefinedIn uses the @available introduced version as the first bound for $ld$previous$ which conflicts with the magic-symbols-for-install-name $ld$install_name$. Eventually @_originallyDefinedIn will need to support multiple install names, but until then just use it as-is and stop using magic-symbols-for-install-name.

Add the missing @_originallyDefinedIn on FLT_RADIX, and match the watchOS/tvOS order between @_originallyDefinedIn and @available.
There was no tvOS 7.0, the first one was 9.0.

rdar://122351557

@ian-twilightcoder ian-twilightcoder requested a review from a team as a code owner February 24, 2024 04:36
@ian-twilightcoder ian-twilightcoder force-pushed the builtin-float-overlay-magic branch 2 times, most recently from 80eb4a9 to 09bbcba Compare February 24, 2024 04:50
…efinedIn

The _Builtin_float interfaces were defined in $@rpath/lib/libswiftDarwin.dylib until macOS 10.14.4 and then in usr/lib/swift/libswiftDarwin.dylib after that. We were trying to use magic-symbols-for-install-name for the first one and @_originallyDefinedIn for the second one. However, @_originallyDefinedIn uses the @available introduced version as the first bound for $ld$previous$ which conflicts with the magic-symbols-for-install-name $ld$install_name$. Eventually @_originallyDefinedIn will need to support multiple install names, but until then just use it as-is and stop using magic-symbols-for-install-name.

Add the missing @_originallyDefinedIn on FLT_RADIX, and match the watchOS/tvOS order between @_originallyDefinedIn and @available.
There was no tvOS 7.0, the first one was 9.0.

rdar://122351557
@ian-twilightcoder ian-twilightcoder force-pushed the builtin-float-overlay-magic branch from 09bbcba to be413e9 Compare February 24, 2024 07:15
@ian-twilightcoder
Copy link
Contributor Author

@swift-ci smoke test

@ian-twilightcoder
Copy link
Contributor Author

@swift-ci test

Comment on lines +16 to +17
@available(macOS 10.9, iOS 7.0, watchOS 2.0, tvOS 9.0, *)
@_originallyDefinedIn(module: "Darwin", macOS 9999, iOS 9999, watchOS 9999, tvOS 9999)
Copy link
Contributor

Choose a reason for hiding this comment

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

Would it make sense to use the macros defined in utils/availability-macros.def?

Suggested change
@available(macOS 10.9, iOS 7.0, watchOS 2.0, tvOS 9.0, *)
@_originallyDefinedIn(module: "Darwin", macOS 9999, iOS 9999, watchOS 9999, tvOS 9999)
@available(SwiftStdlib 5.0)
@_originallyDefinedIn(module: "Darwin", SwiftStdlib 6.0)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I tried that, but they don't appear to be used for @_originallyDefinedIn

Copy link
Contributor Author

@ian-twilightcoder ian-twilightcoder Feb 26, 2024

Choose a reason for hiding this comment

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

SwiftStdlib 5.0 isn't the correct availability, that's long after macOS 10.9, iOS 7.0, watchOS 2.0, tvOS 9.0. There aren't any earlier availability macros to use either, and it didn't seem worth adding one.

@ian-twilightcoder ian-twilightcoder merged commit 89b5215 into swiftlang:main Feb 27, 2024
@ian-twilightcoder ian-twilightcoder deleted the builtin-float-overlay-magic branch February 27, 2024 00:18
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.

2 participants