Skip to content

Commit

Permalink
Linux aarch64
Browse files Browse the repository at this point in the history
  • Loading branch information
Smjert committed Feb 27, 2024
1 parent df31f18 commit 143e728
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 35 deletions.
45 changes: 15 additions & 30 deletions libraries/cmake/source/rocksdb/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -356,16 +356,6 @@ function(rocksdbMain)
)
endif()

if(NOT PLATFORM_MACOS)
target_sources(thirdparty_rocksdb PRIVATE
"${library_root}/third-party/folly/folly/detail/Futex.cpp"
"${library_root}/third-party/folly/folly/synchronization/AtomicNotification.cpp"
"${library_root}/third-party/folly/folly/synchronization/DistributedMutex.cpp"
"${library_root}/third-party/folly/folly/synchronization/ParkingLot.cpp"
"${library_root}/third-party/folly/folly/synchronization/WaitOptions.cpp"
)
endif()

if(TARGET_PROCESSOR STREQUAL "x86_64")
if(NOT PLATFORM_WINDOWS)
set_source_files_properties("${crc32_impl}" PROPERTIES
Expand All @@ -381,28 +371,23 @@ function(rocksdbMain)
endif()

if(PLATFORM_LINUX)
if(TARGET_PROCESSOR STREQUAL "x86_64")
target_compile_definitions(thirdparty_rocksdb PRIVATE
NPERF_CONTEXT
OS_LINUX
ROCKSDB_FALLOCATE_PRESENT
ROCKSDB_LIB_IO_POSIX
ROCKSDB_MALLOC_USABLE_SIZE
ROCKSDB_NO_DYNAMIC_EXTENSION
ROCKSDB_PLATFORM_POSIX
ROCKSDB_PTHREAD_ADAPTIVE_MUTEX
ROCKSDB_RANGESYNC_PRESENT
ROCKSDB_SCHED_GETCPU_PRESENT
)
target_compile_definitions(thirdparty_rocksdb PRIVATE
NPERF_CONTEXT
OS_LINUX
ROCKSDB_AUXV_GETAUXVAL_PRESENT
ROCKSDB_FALLOCATE_PRESENT
ROCKSDB_LIB_IO_POSIX
ROCKSDB_MALLOC_USABLE_SIZE
ROCKSDB_NO_DYNAMIC_EXTENSION
ROCKSDB_PLATFORM_POSIX
ROCKSDB_PTHREAD_ADAPTIVE_MUTEX
ROCKSDB_RANGESYNC_PRESENT
ROCKSDB_SCHED_GETCPU_PRESENT
)

elseif(TARGET_PROCESSOR STREQUAL "aarch64")
if(TARGET_PROCESSOR STREQUAL "aarch64")
target_compile_definitions(thirdparty_rocksdb PRIVATE
NIOSTATS_CONTEXT
NPERF_CONTEXT
OS_LINUX
ROCKSDB_LIB_IO_POSIX
ROCKSDB_NO_DYNAMIC_EXTENSION
ROCKSDB_PLATFORM_POSIX
-DNIOSTATS_CONTEXT
)
endif()

Expand Down
13 changes: 8 additions & 5 deletions libraries/cmake/source/rocksdb/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,16 @@ cmake \
-G Ninja \
-DFAIL_ON_WARNINGS=OFF \
-DROCKSDB_BUILD_SHARED=OFF \
-DROCKSDB_LITE=OFF \
-DWITH_ALL_TESTS=OFF \
-DWITH_BENCHMARK_TOOLS=OFF \
-DWITH_CORE_TOOLS=OFF \
-DWITH_GFLAGS=OFF \
-DWITH_TOOLS=OFF \
-DWITH_TRACE_TOOLS=OFF \
-DWITH_PERF_CONTEXT=OFF \
-DPORTABLE=ON \
-DFORCE_SSE42=ON \
-DWITH_LIBURING=OFF
-DWITH_LIBURING=OFF \
-DOSQUERY_TOOLCHAIN_SYSROOT=/usr/local/osquery-toolchain
```

### Linux AArch64
Expand All @@ -58,17 +58,18 @@ cmake \
-G Ninja \
-DFAIL_ON_WARNINGS=OFF \
-DROCKSDB_BUILD_SHARED=OFF \
-DROCKSDB_LITE=OFF \
-DWITH_ALL_TESTS=OFF \
-DWITH_BENCHMARK_TOOLS=OFF \
-DWITH_CORE_TOOLS=OFF \
-DWITH_GFLAGS=OFF \
-DWITH_TOOLS=OFF \
-DWITH_TRACE_TOOLS=OFF \
-DWITH_PERF_CONTEXT=OFF \
-DWITH_LIBURING=OFF \
-DPORTABLE=ON \
-DHAS_ARMV8_CRC:BOOL=OFF \
-DWITH_IOSTATS_CONTEXT=OFF
-DWITH_IOSTATS_CONTEXT=OFF \
-DOSQUERY_TOOLCHAIN_SYSROOT=/usr/local/osquery-toolchain
```

## macOS
Expand All @@ -88,6 +89,7 @@ cmake \
-DWITH_CORE_TOOLS=OFF \
-DWITH_GFLAGS=OFF \
-DWITH_TOOLS=OFF \
-DWITH_TRACE_TOOLS=OFF \
-DWITH_PERF_CONTEXT=OFF \
-DPORTABLE=ON \
-DCMAKE_OSX_SYSROOT=/Applications/Xcode_15.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.2.sdk \
Expand All @@ -110,6 +112,7 @@ cmake \
-DWITH_CORE_TOOLS=OFF \
-DWITH_GFLAGS=OFF \
-DWITH_TOOLS=OFF \
-DWITH_TRACE_TOOLS=OFF \
-DWITH_PERF_CONTEXT=OFF \
-DPORTABLE=ON \
-DWITH_IOSTATS_CONTEXT=OFF \
Expand Down

0 comments on commit 143e728

Please sign in to comment.