-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Investigate fallback implementations on Windows XP #26654
Comments
I'm looking into implementing SRWLocks and condition variables in a similar way to their actual implementation in Vista+ (atomics and keyed events.) Keyed events are undocumented and don't perform as well under XP as they do under Vista+, but for compatibility code, I think it would be sufficient. |
Since the |
Got a work in progress for SRWLocks and condition variables at MrAlert/rust@dbf7ca0. Most of the related tests seem to pass under XP except for |
Updated WIP at MrAlert/rust@0841300. Added fallback groups, and removed branches on calls to compatibility functions by initializing the function pointers to point to loader stubs instead of NULL. Should perform roughly as well as regular DLL calls now (if it didn't already.) I also tested the fallbacks under Windows 7, and for whatever reason When using the executable from libstd tests that currently fail in XP include: |
The |
#37638 proposes to provide a way to detect if XP compatibility is even wanted. It would be great if libstd could use a mechanism like that so that XP fallbacks are only provided when XP is actually being targetted. This would eliminate the additional runtime overhead of selecting different implementations based on the Windows version. |
I believe that LLVM no longer supports Windows XP, so arguably while work on our side within our libraries would be a slight quality of life improvement, it is not going to change the unsupportedness of XP. If we're interested in individual improvements, please ask on internals.rust-lang.org or by filing an issue here and we can go forward from there. |
This issue is for tracking XP compatibility for binaries produced by rustc, not rustc itself. Therefore this should remain open. |
My understanding was that LLVM doesn't support XP as a target platform -- but I'm fine with keeping this open; I don't exactly know what the problems there are. I agree that it'd be great if we could continue to work on XP. |
LLVM requires Windows 7 or newer as a host platform. It is capable of targeting much older than that, although you still have to tell the linker to target an older version as well as limiting your usage of system APIs to those that are available on older Windows. |
Can LLVM target XP and Vista from Linux? |
@techtonik LLVM's ability to target a specific architecture or operating system is not limited by what host system it is running on. The ability to link the resulting binaries however, does depend on your ability to acquire the appropriate libraries and linker. In the case of targeting Windows from Linux, you'd likely use MinGW for this, which is definitely capable of linking binaries that can run on XP. |
I've created a thread about considering dropping XP support: https://internals.rust-lang.org/t/consider-dropping-support-for-windows-xp/8745 |
Closing as Windows XP is no longer supported rust-lang/compiler-team#378 |
Right now we have a large list of APIs we're using on Windows which aren't available on XP. The fallback implementations range from "call SetLastError" to "panic when called". There are likely at least somewhat compatible fallbacks in each situation that can be used:
The text was updated successfully, but these errors were encountered: