-
Notifications
You must be signed in to change notification settings - Fork 892
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
When running a 32-bit rustup on an aarch64 CPU, select a 32-bit toolchain #3490
Conversation
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.
Looks good!
Although I originally expected a runtime detection of the userland's bitness, this approach of using the comptime info does seem to be okay, since being able to run a 32-bit rustup
does imply that the current system at least has a 32-bit libc.
Thus, this should fix the Raspberry Pi issue if the user is indeed running a 32-bit version of rustup
.
It's okay to merge this PR first anyway that will indeed fix a common use case... However, I'm still wondering if something similar will happen on other platforms, and if this approach should be further generalized. cc @rbtcollins |
@alex It suddenly occurred to me that some people might be running Pi OS with a 64-bit userland, with 32-bit compatibility mode enabled, and even have accidentally downloaded a 32-bit So I guess making the bitness check a runtime one might still be better after all. This way, it will also address your concerns around host/target differences even better. What do you think? |
A runtime check would produce the same results, unless you're suggesting we check |
@alex I just saw where my misunderstanding was, so sorry for not being clear enough previously! 🙏🙏🙏 I did mean to say |
I think what I'll do is check |
…hain this mirrors a similar check that exists in rustup-init.sh fixes rust-lang#3307
this mirrors a similar check that exists in rustup-init.sh
fixes #3307