[Windows] Fix SSE4.2 detection with LTO build.

This commit is contained in:
Pāvels Nadtočajevs
2025-07-15 17:23:35 +03:00
parent d5cb0f948e
commit 6ec518dfc4

View File

@ -36,6 +36,10 @@ extern int WINAPI mainCRTStartup();
extern int WINAPI WinMainCRTStartup();
#endif
#if defined(__GNUC__) || defined(__clang__)
extern int WINAPI ShimMainCRTStartup() __attribute__((used));
#endif
extern int WINAPI ShimMainCRTStartup() {
if (IsProcessorFeaturePresent(PF_SSE4_2_INSTRUCTIONS_AVAILABLE)) {
#ifdef WINDOWS_SUBSYSTEM_CONSOLE