Skip to content

[TBDGen][Test] Add expected failure for symbol difference on iOS #72000

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
Mar 4, 2024

Conversation

cyndyishida
Copy link
Contributor

It turns out that on iOS builds theres variance on whether OBJC_(META)CLASS symbols get emitted & exported. What's important for TBDGen is that it matches what gets exposed in binaries and that is still upheld on iOS.

resolves: rdar://123811306

@cyndyishida cyndyishida requested a review from tshortli March 1, 2024 02:59
@cyndyishida
Copy link
Contributor Author

When I compiled the object file for the same source that generated the TBD file, the actual symbol set differs. So TBDGen matches that behavior, which is good. But I don't understand why they differ on a platform level, for the sake of time, I haven't investigated whether that is expected. The other Darwin platforms, according to what I checked on CI, look consistent.

$ nm -gmU client-ios.o | swift-demangle  | rg CLASS
0000000000000310 (__DATA,__data) external [alt entry] _OBJC_CLASS_$_client.extendedAPI.Square
00000000000002e0 (__DATA,__data) external [no dead strip] _OBJC_METACLASS_$_client.extendedAPI.Square
$ nm -gmU client-macos.o | swift-demangle | rg CLASS
00000000000002d0 (__DATA,__data) external [no dead strip] _OBJC_METACLASS_$_client.extendedAPI.Square

@cyndyishida
Copy link
Contributor Author

@swift-ci please test

Copy link
Contributor

@tshortli tshortli left a comment

Choose a reason for hiding this comment

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

Thanks!

@cyndyishida
Copy link
Contributor Author

@swift-ci please test

It turns out that on iOS builds theres variance on whether `OBJC_(META)CLASS` symbols get emitted & exported. What's important for TBDGen is that it matches what gets exposed in binaries and that is still upheld on iOS.

resolves: rdar://123811306
@cyndyishida cyndyishida force-pushed the cyndyishida-NonMetaClass branch from a7caf37 to ec63ca6 Compare March 1, 2024 21:03
@cyndyishida
Copy link
Contributor Author

@swift-ci please test

1 similar comment
@glessard
Copy link
Contributor

glessard commented Mar 3, 2024

@swift-ci please test

@cyndyishida cyndyishida merged commit 182a27e into swiftlang:main Mar 4, 2024
@cyndyishida cyndyishida deleted the cyndyishida-NonMetaClass branch March 4, 2024 16:30
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