Skip to content

Commit

Permalink
Fix SSE 4.2 test
Browse files Browse the repository at this point in the history
When building with zig cc I get:

```
error: always_inline function '_mm_crc32_u32' requires target feature 'crc32', but would be inlined into function 'calc_crc32c' that is compiled without support for 'crc32'
    5 |       crc32c = (unsigned)_mm_crc32_u32(crc32c, *(unsigned*)text);
      |                          ^
1 error generated.
```

This PR adds -mcrc32, another option would be to use a different SSE4.2 op
  • Loading branch information
mikejsavage authored and slouken committed Feb 8, 2025
1 parent 7c12c63 commit 5d1bbd9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -751,7 +751,7 @@ if(SDL_ASSEMBLY)
if(SDL_SSE4_2)
cmake_push_check_state()
if(USE_GCC OR USE_CLANG OR USE_INTELCC)
string(APPEND CMAKE_REQUIRED_FLAGS " -msse4.2")
string(APPEND CMAKE_REQUIRED_FLAGS " -msse4.2 -mcrc32")
endif()
check_c_source_compiles("
#include <nmmintrin.h>
Expand Down

0 comments on commit 5d1bbd9

Please sign in to comment.