Skip to content

Commit 16dde54

Browse files
committed
Merge pull request #108637 from bruvzg/lto_fix_sse42
[Windows] Fix SSE4.2 detection with LTO build.
2 parents 0f23b7b + 6ec518d commit 16dde54

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

platform/windows/cpu_feature_validation.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ extern int WINAPI mainCRTStartup();
3636
extern int WINAPI WinMainCRTStartup();
3737
#endif
3838

39+
#if defined(__GNUC__) || defined(__clang__)
40+
extern int WINAPI ShimMainCRTStartup() __attribute__((used));
41+
#endif
42+
3943
extern int WINAPI ShimMainCRTStartup() {
4044
if (IsProcessorFeaturePresent(PF_SSE4_2_INSTRUCTIONS_AVAILABLE)) {
4145
#ifdef WINDOWS_SUBSYSTEM_CONSOLE

0 commit comments

Comments
 (0)