Repository navigation
Conversation
|
Focused Rust1.95.0 checks passed for aarch64-apple-ios-sim and aarch64-apple-ios; macOS apple_dyld integration test passed1/1. Added iOS semver symbol coverage per CONTRIBUTING. @rustbot label stable-nominated |
|
Retargeted this regression restoration to libc-0.2: it is based on the released0.2.190 API used by consumers. Targeting main(v1.0) produced an unrelated release-branch diff, so this PR intentionally targets the stable branch for a minimal platform restoration. If maintainer policy requires main first, this needs a separately mapped API patch there rather than any0.2->1.0 reversion. |
|
|
Just chiming in to say this fixes a very real bug in the wild 🙂 Renovate's routine lock file update moved Paperback (an ebook reader) to libc 0.2.190, and our iOS build promptly fell over with E0425 on all four |
|
|
||
| #[exhaustive] // FIXME(exhaustive): review for 1.0 | ||
| #[cfg(target_os = "macos")] | ||
| #[cfg(any(target_os = "macos", target_os = "ios"))] |
There was a problem hiding this comment.
Is there any specific reason to keep it gated to macos/ios, instead of making it available on all Apple targets by getting rid of this cfg?
There was a problem hiding this comment.
dyld.h doesn't mark these functions unavailable on tvOS/watchOS, the tvOS, watchOS and visionOS SDKs declare them. It specify __API_AVAILABLE but it looks like it sets the minimum version for the macos, ios, not restricting to these platforms, in case of restrictions __API_UNAVAILABLE is used:
https://github.com/apple-oss-distributions/dyld/blob/dyld-1378/include/mach-o/dyld.h#L166
There was a problem hiding this comment.
Yes, this should not be gated, it's available on tvOS, watchOS and visionOS too.
There was a problem hiding this comment.
See also a bit of background in #5612 (review).
I think this is correct, modulo the cfg-gating, these symbols are available on the other Apple platforms too.
|
Reminder, once the PR becomes ready for a review, use |
Fixes #5601. The Xcode26.5 iPhoneSimulator SDK mach-o/dyld.h60-63 marks these4 functions __API_AVAILABLE(macos(10.1),ios(2.0)); mach-o/loader.h defines both header layouts. Restore only these public APIs/types on iOS, preserving macOS support and leaving unsupported mach_vm APIs restricted. Adds compile/signature/layout regression for iOS+macOS. Observed backtrace0.3.76 failed E0425 for all4 functions with libc0.2.190 when building actual iOS app. This branch is based on0.2.190 to permit downstream git pin; no unrelated bindings changes.