Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Smjert committed Feb 27, 2024
1 parent 143e728 commit afbdfde
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 17 deletions.
25 changes: 9 additions & 16 deletions libraries/cmake/source/rocksdb/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -358,13 +358,16 @@ function(rocksdbMain)

if(TARGET_PROCESSOR STREQUAL "x86_64")
if(NOT PLATFORM_WINDOWS)
set_source_files_properties("${crc32_impl}" PROPERTIES
COMPILE_FLAGS
"-msse4.2 -mpclmul"
target_compile_options(thirdparty_rocksdb PRIVATE
"-msse4.2 -mpclmul"
)
endif()

elseif(TARGET_PROCESSOR STREQUAL "aarch64")
if(NOT PLATFORM_WINDOWS)
target_compile_options(thirdparty_rocksdb PRIVATE
"-march=armv8-a+crc+crypto"
)
endif()
target_sources(thirdparty_rocksdb PRIVATE
"${library_root}/util/crc32c_arm64.cc"
)
Expand All @@ -373,6 +376,7 @@ function(rocksdbMain)
if(PLATFORM_LINUX)
target_compile_definitions(thirdparty_rocksdb PRIVATE
NPERF_CONTEXT
NIOSTATS_CONTEXT
OS_LINUX
ROCKSDB_AUXV_GETAUXVAL_PRESENT
ROCKSDB_FALLOCATE_PRESENT
Expand All @@ -385,28 +389,17 @@ function(rocksdbMain)
ROCKSDB_SCHED_GETCPU_PRESENT
)

if(TARGET_PROCESSOR STREQUAL "aarch64")
target_compile_definitions(thirdparty_rocksdb PRIVATE
-DNIOSTATS_CONTEXT
)
endif()

elseif(PLATFORM_MACOS)
target_compile_definitions(thirdparty_rocksdb PRIVATE
HAVE_FULLSYNC
NPERF_CONTEXT
NIOSTATS_CONTEXT
OS_MACOSX
ROCKSDB_LIB_IO_POSIX
ROCKSDB_NO_DYNAMIC_EXTENSION
ROCKSDB_PLATFORM_POSIX
)

if(TARGET_PROCESSOR STREQUAL "aarch64")
target_compile_definitions(thirdparty_rocksdb PRIVATE
NIOSTATS_CONTEXT
)
endif()

elseif(PLATFORM_WINDOWS)
if(TARGET_PROCESSOR STREQUAL "x86_64")
target_compile_definitions(thirdparty_rocksdb
Expand Down
1 change: 0 additions & 1 deletion libraries/cmake/source/rocksdb/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ cmake \
-DWITH_PERF_CONTEXT=OFF \
-DWITH_LIBURING=OFF \
-DPORTABLE=ON \
-DHAS_ARMV8_CRC:BOOL=OFF \
-DWITH_IOSTATS_CONTEXT=OFF \
-DOSQUERY_TOOLCHAIN_SYSROOT=/usr/local/osquery-toolchain
```
Expand Down

0 comments on commit afbdfde

Please sign in to comment.