From afbdfde033dbe6591a6a60b629bb723b6e46fa73 Mon Sep 17 00:00:00 2001 From: Stefano Bonicatti Date: Tue, 27 Feb 2024 23:33:45 +0100 Subject: [PATCH] fixes --- libraries/cmake/source/rocksdb/CMakeLists.txt | 25 +++++++------------ libraries/cmake/source/rocksdb/README.md | 1 - 2 files changed, 9 insertions(+), 17 deletions(-) diff --git a/libraries/cmake/source/rocksdb/CMakeLists.txt b/libraries/cmake/source/rocksdb/CMakeLists.txt index 5a8763ace42..7b1b4352749 100644 --- a/libraries/cmake/source/rocksdb/CMakeLists.txt +++ b/libraries/cmake/source/rocksdb/CMakeLists.txt @@ -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" ) @@ -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 @@ -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 diff --git a/libraries/cmake/source/rocksdb/README.md b/libraries/cmake/source/rocksdb/README.md index e4daa580d3a..5fb3373c27f 100644 --- a/libraries/cmake/source/rocksdb/README.md +++ b/libraries/cmake/source/rocksdb/README.md @@ -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 ```