mirror of
https://github.com/hanzoai/datastore.git
synced 2026-09-26 13:55:07 +00:00
13,838 upstream commits, forward from the 26.6.1.1 fork point. 129 conflicts: 37 resolved mechanically (take upstream's file, re-apply the brand sweep) and 92 by hand where our fork and upstream had both changed the same code. The rule throughout: upstream owns the engine, we own the naming and a small set of deliberate deviations. Never resolve by discarding an upstream change — a dropped rename or a missed new parameter becomes a compile error a thousand files away. Deviations verified intact after the merge: ENABLE_XRAY still defaults OFF (CMakeLists.txt:105) X-Datastore-User read by the server (authenticateUserByHTTP.cpp) X-ClickHouse-* in src/ 0 hanzo/research present system.*_log retention bound present ArrowFlight rip held against upstream re-adding it Two things worth naming, because neither shows up as a conflict: src/CMakeLists.txt gained an UNGUARDED `add_object_library(datastore_storages_arrowflight Storages/ArrowFlight)` from upstream, for a directory our gRPC rip deleted. It sat outside every conflict hunk, so a resolver reading only the markers would sail straight past it into a CMake configure error. Removed; the Server/ArrowFlight sibling at line 474 stays because it is inside `if (TARGET ch_contrib::arrow_flight)`. The brand sweep had rewritten github.com/ClickHouse/ClickHouse issue links to github.com/Datastore/Datastore — a dead host. Those point at upstream's own tracker and are restored, alongside the contributors list, sql.clickhouse.com and the ClickHouse Inc copyright: attribution is theirs, not ours to rename. base/glibc-compatibility/memcpy/memcpy.h is deleted, not kept: upstream dropped it for LLVM-libc's, and our only change to it was a comment rebrand.
43 lines
1.5 KiB
CMake
43 lines
1.5 KiB
CMake
set(CRC32C_DIR ${Datastore_SOURCE_DIR}/contrib/crc32c)
|
|
set(CRC32C_CMAKE_DIR ${Datastore_SOURCE_DIR}/contrib/crc32c-cmake)
|
|
|
|
include_directories("${PROJECT_BINARY_DIR}/include")
|
|
|
|
set(CRC32C_SOURCES
|
|
"${CRC32C_DIR}/src/crc32c_internal.h"
|
|
"${CRC32C_DIR}/src/crc32c_portable.cc"
|
|
"${CRC32C_DIR}/src/crc32c_prefetch.h"
|
|
"${CRC32C_DIR}/src/crc32c_read_le.h"
|
|
"${CRC32C_DIR}/src/crc32c_round_up.h"
|
|
"${CRC32C_DIR}/src/crc32c.cc"
|
|
)
|
|
|
|
if(ARCH_AARCH64 AND NOT NO_ARMV81_OR_HIGHER)
|
|
# crc32c_arm64.cc uses the vmull_p64 instruction, which requires the AES extension.
|
|
# The default ARM profile includes +crypto (which implies AES), the compat profile does not.
|
|
include_directories(${CRC32C_CMAKE_DIR}/aarch64)
|
|
list(APPEND CRC32C_SOURCES "${CRC32C_DIR}/src/crc32c_arm64.cc")
|
|
elseif(ARCH_AMD64)
|
|
if(X86_ARCH_LEVEL VERSION_GREATER_EQUAL 2)
|
|
include_directories(${CRC32C_CMAKE_DIR}/x86_64/sse42)
|
|
list(APPEND CRC32C_SOURCES "${CRC32C_DIR}/src/crc32c_sse42.cc")
|
|
else()
|
|
include_directories(${CRC32C_CMAKE_DIR}/x86_64/no_sse42)
|
|
endif()
|
|
elseif(ARCH_S390X)
|
|
# s390x is big-endian; the portable implementation needs the right byte order define.
|
|
include_directories(${CRC32C_CMAKE_DIR}/generic_be)
|
|
else()
|
|
# Portable little-endian fallback for ARMv8.0 compat, ppc64le, riscv64, loongarch64, etc.
|
|
include_directories(${CRC32C_CMAKE_DIR}/generic)
|
|
endif()
|
|
|
|
add_library(_crc32c ${CRC32C_SOURCES})
|
|
|
|
target_include_directories(_crc32c
|
|
PUBLIC
|
|
$<BUILD_INTERFACE:${CRC32C_DIR}/include>
|
|
)
|
|
|
|
add_library(ch_contrib::crc32c ALIAS _crc32c)
|