-
Notifications
You must be signed in to change notification settings - Fork 96
Remove uneeded instrinsic stub #191
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
I think given my curse I'd prefer some conditional compilation trickery that only removes this function when using >= 1.70 |
I'm not sure we should keep this workaround in tbh, even behind a cfg. Anyone using <1.70.0.0 can just add the workaround back into their bin crate. Patching this sort of thing in a library is not a good idea. |
welp I take it back because apparently, soft-float is missing intrinsic's for RISCV too? wtf? |
I guess a cfg-gate for Xtensa / RISCV would be good enough plus probably mention this in the README for now (i.e. what a user should do if there they get |
Maybe (if we don't mind another nightly feature) we can mark it with weak linkage? I really don't like the idea of having this symbol in a library crate, IMO this should really be patched in the final binary crate. |
This is kinda breaking the stability guarantees that rust usually holds (yes, I know the library is independent of the language, but the philosophy is similar enough): a compiler upgrade shouldn't break existing code. The workaround is easy enough in esp-wifi (though |
Whilst I agree, this actually introduces a breaking change time bomb for the future, the second this intrinsic is available for RISCV, builds stop working when upgrading the compiler. This is what happened with 1.70.0 using esp-wifi on Xtensa chips. That's what I'm trying to avoid. Interestingly, it seems the failure is only on the C6 (riscv32imac) but the other chips (riscv32imc) seem to compile fine, no idea why that would be. |
This comment was marked as outdated.
This comment was marked as outdated.
I think it's only breaking C6 since the blobs for C2/C3 don't include code that needs I guess if it's solvable with weak linking that wouldn't be a bad thing (and we need nightly anyway) I also agree it shouldn't be ideally solved in the library but will make the user's lives much easier |
96045e2
to
f6425ae
Compare
I've gone with the weak linkage option because if we're pulling in an unstable feature we may as well use the one that requires less work to maintain. By the way it looks like in the future all intrinsics from compiler builtins could become |
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.
LGTM
The changes from rust-lang/compiler-builtins#517 have landed.
I suppose this might break stuff for people who don't upgrade to 1.70, but they can always add there own stub if they want.