Skip to content

Commit 228630f

Browse files
committed
rocksdb: disable on arm64 except for Linux
Thanks to Theodore Brockman on Zulip for noticing on an OSX ARM64 and testing this patch. Per https://github.com/google/cpu_features/pull/150/files CMAKE_SYSTEM_PROCESSOR is arm64 on Apple. Without this, compulation error: [ 80%] Building CXX object storage/rocksdb/CMakeFiles/rocksdblib.dir/rocksdb/util/crc32c.cc.o /mariadb/storage/rocksdb/rocksdb/util/crc32c.cc:500:18: error: use of undeclared identifier 'isSSE42' has_fast_crc = isSSE42(); ^ /mariadb/storage/rocksdb/rocksdb/util/crc32c.cc:1230:7: error: use of undeclared identifier 'isSSE42' if (isSSE42()) { ^ /mariadb/storage/rocksdb/rocksdb/util/crc32c.cc:1231:9: error: use of undeclared identifier 'isPCLMULQDQ' if (isPCLMULQDQ()) { ^ This can be reverted when the RocksDB submodule is updated. facebook/rocksdb@ee4bd47
1 parent c45aeea commit 228630f

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

storage/rocksdb/CMakeLists.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,15 @@ IF (WIN32 AND CMAKE_SIZEOF_VOID_P EQUAL 4)
4444
SKIP_ROCKSDB_PLUGIN("32-Bit Windows are temporarily disabled")
4545
ENDIF()
4646

47+
#
48+
# Also, disable on ARM64 when not Linux
49+
# Requires submodule update to v6.16.3
50+
# containing commit https://github.com/facebook/rocksdb/commit/ee4bd4780b321ddb5f92a0f4eb956f2a2ebd60dc
51+
#
52+
IF(CMAKE_SYSTEM_PROCESSOR MATCHES "(arm64|aarch64)" AND NOT CMAKE_SYSTEM_NAME STREQUAL "Linux")
53+
SKIP_ROCKSDB_PLUGIN("ARM64 disabled on all except Linux")
54+
ENDIF()
55+
4756
# This plugin needs recent C++ compilers (it is using C++11 features)
4857
# Skip build for the old compilers
4958
SET(CXX11_FLAGS)

0 commit comments

Comments
 (0)