-
Notifications
You must be signed in to change notification settings - Fork 211
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
Various symbols on win/apple are no longer weak after #598 #653
Comments
Thanks! Can you submit this as a PR? |
To clarify, some but not all symbols were marked weak on win/apple. I'm not sure if marking them all as weak matters or not. I'll do a bit more testing, and audit other places that check win/apple. |
Should #598 be considered for reverting while this is being investigated? |
Let's see if we can make them unconditionally weak first, since #598 wouldn't be the cleanest revert. If somebody puts up a PR we can start that process. |
So, regarding this issue. The main thing about that attr is that we thought A better fix would be to completely remove these symbols on |
At link time, Windows can have a kind weak symbols (e.g. see "Weak Externals" or But in any case I would agree it's better to just remove these for now and then figure out if/how to add them back. Maybe that would require rustc changes. |
It was mentioned in the issue description that in the previous version the |
@Amjad50 are you able to put up a fix? Based on the above, this probably needs to be a manual partial revert of #598. While that is being prepared, I still think we should try making symbols weak on all platforms as in the original comment by @aeubanks. This is a single line fix that we can merge quickly - if it corrects things then great, if not then we have a slower revert coming. (beta branch is in ~9 days, we should try to have this resolved by then) |
Yes, I'll then move on with enabling |
Reopening until we verify this fixes things. |
I noticed https://github.com/rust-lang/rust/blob/8269be147b13812c201d0b64966adc1c6536ca59/compiler/rustc_codegen_ssa/src/back/link.rs#L2752-L2753 which makes it seem like builtins has to be static. So maybe we are okay here for DLLs too? In any case, with the changes in #672 I think we should be at least as compatible as with the |
After upgrading our rust toolchain version, on multiple win/apple platforms (arm64 win specifically for this error) we're seeing link errors like
I believe this is due to #598. We were using the weak-intrinsics feature before. #598 removes that feature and makes everything weak by default, except for on win/apple platforms. That seems to be because some intrinsics unconditionally were not marked weak on win/apple. However, not all intrinsics were like that, e.g. the symbols in the error message above.
The following diff seems to make the error go away
The text was updated successfully, but these errors were encountered: