-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Windows CRT linking behavior in no_std build #1203
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
Comments
I think we've just never gotten around to implementing this, would be good to fix! |
I've commented out the I've read through it and if I understood right, Do you have any suggestion what could be done to fix this? |
The |
Do you mean the top-level one or is there another build script that I'm not aware of? A quick search turned up that the only two usages of |
Yes in that build script it should be possible to detect whether we're using a static crt or not, and then emit a cfg directive indicating which linking directive should be used. |
Is the |
I'd recommend testing it out locally! I suspect whatever works is good to go |
Closing in favor of #1227 (comment). |
Relevant users forum thread: https://users.rust-lang.org/t/linker-error-when-building-no-std-windows-dll-that-uses-libc/23976
My goal is to enable Rust to run on Windows UWP, which requires linking to a different version of the CRT. Since there's no support in the standard library yet, I tried to go the no_std route to get familiar with the linking behavior on win32 before trying to adapt to UWP. However, as was pointed out by
winapi
s maintainer, libc doesn't link properly for no_std executables/DLLs.Is there a reason for this behavior or is this a bug?
The text was updated successfully, but these errors were encountered: