-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Cleanup Win7 and earlier compatibility from CoreCLR #122884
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
|
Tagging subscribers to this area: @mangod9 |
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.
Pull request overview
This PR removes Windows 7 compatibility code from CoreCLR, reflecting that the minimum supported version is now Windows 8 or later. The changes streamline the codebase by removing version detection logic, eliminating delay-load infrastructure for WinRT APIs, and simplifying WinRT initialization code.
Key changes:
- Removes the delay-load hook mechanism and associated delay-load directives for WinRT and version.dll, as these APIs are now always available
- Eliminates OS version detection code that checked for Windows 7 vs Windows 8
- Removes WinRT support checks since WinRT is now assumed to be available on all supported platforms
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/native/libs/Common/delayloadhook_windows.cpp | Complete removal of delay-load security hook used to force System32 search path for delay-loaded DLLs |
| src/native/corehost/apphost/static/CMakeLists.txt | Removes delay-load directives for WinRT API and version.dll, removes delayloadhook reference and delayimp.lib dependency, fixes trailing whitespace |
| src/coreclr/vm/threads.cpp | Removes WinRTSupported() assertions since WinRT is now always available, updates comments to reflect this |
| src/coreclr/utilcode/util_nodependencies.cpp | Removes InitRunningOnVersionStatus() function and gRunningOnStatus global variable used for OS version detection |
| src/coreclr/inc/ostype.h | Removes RunningOnStatusEnum, gRunningOnStatus, InitRunningOnVersionStatus(), RunningOnWin8(), and WinRTSupported() declarations |
| src/coreclr/dlls/mscoree/coreclr/CMakeLists.txt | Removes delay-load directives for WinRT and version.dll, removes delayimp.lib dependency |
| src/coreclr/dlls/mscoree/CMakeLists.txt | Removes delayloadhook_windows.cpp and Native.rc from sources list |
Co-authored-by: Copilot <[email protected]>
|
Some of this cleanup was done by copilot in #122907 |
When running on Windows, we are now always running on Win8.
We also don't need to delay-load the WinRT APIs used by CoreCLR anymore as they're always available.
We can also remove the delay loading for version.dll now that we pass
/DEPENDENTLOADFLAG:0x800to force dependencies to be loaded from System32 (the original reason for the delay load hook was to force System32 instead of the default lookup rules for the commonly namedversion.dll).