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.
60 lines
2.1 KiB
CMake
60 lines
2.1 KiB
CMake
set(STRINGZILLA_SOURCE_DIR "${Datastore_SOURCE_DIR}/contrib/StringZilla")
|
|
|
|
SET(STRINGZILLA_SOURCES
|
|
"${STRINGZILLA_SOURCE_DIR}/c/compare.c"
|
|
"${STRINGZILLA_SOURCE_DIR}/c/find.c"
|
|
"${STRINGZILLA_SOURCE_DIR}/c/hash.c"
|
|
"${STRINGZILLA_SOURCE_DIR}/c/intersect.c"
|
|
"${STRINGZILLA_SOURCE_DIR}/c/memory.c"
|
|
"${STRINGZILLA_SOURCE_DIR}/c/sort.c"
|
|
"${STRINGZILLA_SOURCE_DIR}/c/stringzilla.c"
|
|
"${STRINGZILLA_SOURCE_DIR}/c/utf8.c"
|
|
"${STRINGZILLA_SOURCE_DIR}/c/utf8_case.c"
|
|
"${STRINGZILLA_SOURCE_DIR}/c/utf8_word.c"
|
|
)
|
|
file(GLOB STRINGZILLA_HEADERS "${STRINGZILLA_SOURCE_DIR}/include/stringzilla/*.h" "${STRINGZILLA_SOURCE_DIR}/include/stringzilla/*.hpp")
|
|
|
|
add_library(_stringzilla ${STRINGZILLA_SOURCES} ${STRINGZILLA_HEADERS})
|
|
add_library(ch_contrib::stringzilla ALIAS _stringzilla)
|
|
target_include_directories(_stringzilla SYSTEM PUBLIC "${STRINGZILLA_SOURCE_DIR}/include")
|
|
|
|
if (ARCH_AMD64)
|
|
target_compile_definitions(
|
|
_stringzilla PRIVATE
|
|
"SZ_USE_WESTMERE=1"
|
|
"SZ_USE_GOLDMONT=1"
|
|
"SZ_USE_HASWELL=1"
|
|
"SZ_USE_SKYLAKE=1"
|
|
"SZ_USE_ICE=1"
|
|
"SZ_USE_GOLDMONT=1"
|
|
"SZ_USE_NEON=0"
|
|
"SZ_USE_NEON_AES=0"
|
|
"SZ_USE_NEON_SHA=0"
|
|
"SZ_USE_SVE=0"
|
|
"SZ_USE_SVE2=0"
|
|
"SZ_USE_SVE2_AES=0"
|
|
)
|
|
elseif (ARCH_AARCH64)
|
|
target_compile_definitions(
|
|
_stringzilla PRIVATE
|
|
"SZ_USE_WESTMERE=0"
|
|
"SZ_USE_GOLDMONT=0"
|
|
"SZ_USE_HASWELL=0"
|
|
"SZ_USE_SKYLAKE=0"
|
|
"SZ_USE_ICE=0"
|
|
"SZ_USE_GOLDMONT=0"
|
|
"SZ_USE_NEON=1"
|
|
"SZ_USE_NEON_AES=1"
|
|
"SZ_USE_NEON_SHA=1"
|
|
"SZ_USE_SVE=1"
|
|
"SZ_USE_SVE2=1"
|
|
"SZ_USE_SVE2_AES=1"
|
|
)
|
|
endif ()
|
|
|
|
# We need SZ_DYNAMIC_DISPATCH=1 to be public because otherwise the headers will redefine the API (sz_find for example)
|
|
# again and avoid dynamic dispatch.
|
|
target_compile_definitions(_stringzilla PUBLIC "SZ_DYNAMIC_DISPATCH=1")
|
|
target_compile_definitions(_stringzilla PRIVATE "SZ_AVOID_LIBC=0")
|
|
target_compile_definitions(_stringzilla PRIVATE "SZ_DEBUG=0")
|