-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
watchOS: fixes for ilp32 ABI #21765
watchOS: fixes for ilp32 ABI #21765
Conversation
Xcode requires target amd64_32 (aarch64-watchos-ilp32) in order to build code for Apple Watches. This commit fixes compilation errors that appear when compiling with that target.
Leave `std.macho` as it was and use `@intCast` to that some `u64` values fit in a `usize`. The `ilp32` ABI uses 32bit pointers, so usize is also smaller.
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 seems reasonable to me given the API shape of std.macho
, but I'd like @kubkon to take a look at the std.debug.SelfInfo
changes.
I haven't looked closely yet, but do we really need all those intcasts sprinkled everywhere? Do we currently handle any 32bit arch for linux perhaps? If so how do we deal with the issue there? |
No, I've only just started the basics of x32/n32 support over in #21717. Standard library support is still on the to-do list. I believe that with these changes, As I understand it, the int casts are necessary because of the API shape of
|
Yeah, exactly that. I wasn't sure what was better, |
Exciting! Just FYI, I've been using my branch to build static libraries ( |
Xcode requires target amd64_32 (aarch64-watchos-ilp32) in order to build code for Apple Watches. This commit fixes compilation errors that appear when compiling with that target.
This PR is a followup to #21752