]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cmake: do not pass $SIMD_COMPILE_FLAGS to rocksdb cmake 17745/head
authorKefu Chai <kchai@redhat.com>
Fri, 15 Sep 2017 02:30:16 +0000 (10:30 +0800)
committerKefu Chai <kchai@redhat.com>
Fri, 15 Sep 2017 02:38:14 +0000 (10:38 +0800)
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.

src/CMakeLists.txt

index 915e10aa66493da8afc072f9f206f3caeda8ad98..3cdcb95be4b9b78daace47edbba3c3eab1bd449e 100644 (file)
@@ -811,13 +811,8 @@ if (NOT WITH_SYSTEM_ROCKSDB)
     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})