which enables SSE42 globally in rocksdb. and we will end up with a
binary not portable on non-SSE42 enabled machines.
Fixes: http://tracker.ceph.com/issues/20529
Signed-off-by: Kefu Chai <kchai@redhat.com>
Conflicts:
this change is not cherry-picked from master. because the
PR targeting master (https://github.com/ceph/ceph/pull/17388) is
still pending on review. and the cmake changes is different if
we want to use a recent commit of rocksdb, as it's doing differently
in cmake to address the portability issues.
list(APPEND ROCKSDB_CMAKE_ARGS -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER})
endif(WITH_CCACHE AND CCACHE_FOUND)
- # We really want to have the CRC32 calculation in RocksDB accelerated
- # with SSE 4.2. For details refer to rocksdb/util/crc32c.cc.
- if (HAVE_INTEL_SSE4_2)
- list(APPEND ROCKSDB_CMAKE_ARGS -DCMAKE_CXX_FLAGS=${SIMD_COMPILE_FLAGS})
- else()
- list(APPEND ROCKSDB_CMAKE_ARGS -DWITH_SSE42=OFF)
- endif()
+ # SSE 4.2 is enabled by default in rocksdb's crc32c. For details refer to
+ # rocksdb/util/crc32c.cc.
list(APPEND ROCKSDB_CMAKE_ARGS -DCMAKE_AR=${CMAKE_AR})
list(APPEND ROCKSDB_CMAKE_ARGS -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE})