Skip to content

Commit a90b386

Browse files
committed
MDEV-16860 MyRocks: support CRC32 instructions on Winx64
Compile on Windows MSVC with -DHAVE_SSE2 and -DHAVE_PCLMUL It is safe, since code will do also runtime checks via cpuid(), before using the instructions, and will fallback to slower versions, if instructions are not available.
1 parent f4eac2d commit a90b386

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

storage/rocksdb/build_rocksdb.cmake

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,9 @@ SET(SOURCES)
376376
FOREACH(s ${ROCKSDB_SOURCES})
377377
list(APPEND SOURCES ${ROCKSDB_SOURCE_DIR}/${s})
378378
ENDFOREACH()
379-
379+
IF(MSVC)
380+
add_definitions(-DHAVE_SSE42 -DHAVE_PCLMUL)
381+
ENDIF()
380382
IF(CMAKE_VERSION VERSION_GREATER "2.8.10")
381383
STRING(TIMESTAMP GIT_DATE_TIME "%Y-%m-%d %H:%M:%S")
382384
ENDIF()

0 commit comments

Comments
 (0)