vendor: move hash to vendor (#27262)

* vendor: move hash to vendor

* group hashes into one single static lib
This commit is contained in:
Xuan-Son Nguyen
2026-08-17 18:21:02 +02:00
committed by GitHub
parent 34af94cd9a
commit 39be55c97e
18 changed files with 122 additions and 66 deletions
+21
View File
@@ -0,0 +1,21 @@
set(TARGET vendor-hash)
llama_add_compile_flags()
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
add_library(${TARGET} STATIC
xxhash/xxhash.c
sha1/sha1.c
sha256/sha256.c
)
# disable warnings in 3rd party code
if (CMAKE_C_COMPILER_ID STREQUAL "MSVC")
target_compile_options(${TARGET} PRIVATE /w)
else()
target_compile_options(${TARGET} PRIVATE -w)
endif()
# sha256.c includes "rotate-bits/rotate-bits.h", so consumers get this dir too
target_include_directories(${TARGET} PUBLIC .)