Skip to content

Commit 1c8fbdc

Browse files
rlyerlymeta-codesync[bot]
authored andcommitted
Add xxhash as OSS dependency
Summary: Add xxhash to OSS since ShmManager now depends on it Reviewed By: pbhandar2 Differential Revision: D99326496 fbshipit-source-id: c57d1dfd7f9e142959a093e30ae605185b1f360a
1 parent a7b5387 commit 1c8fbdc

6 files changed

Lines changed: 18 additions & 3 deletions

File tree

BUILD.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ These dependencies further require multiple libraries:
2222
* [https://github.com/google/googletest.git](googletest) - Google Testing Framework
2323
* [https://github.com/fmtlib/fmt.git](fmt) - open-source formatting library
2424
* [https://github.com/Tessil/sparse-map.git](sparse-map) - memory efficient hash map and hash set
25+
* [https://github.com/Cyan4973/xxHash](xxHash) - extremely fast non-cryptographic hash algorithm
2526
* And many more libraries, commonly available as installable packages, e.g:
2627
`boost`, `libevent`, `lz4`, `snappy`, `zlib`, `ssl`, `libunwind`, `libsodium`
2728

@@ -114,7 +115,7 @@ pull the latest changes (if any).
114115
115116
Downloads the latest source code version of the following libraries,
116117
builds and installs them (using `sudo`):
117-
`googleflags`, `googlelog`, `sparsemap`, `fmt`, `folly`, `fizz`,
118+
`googleflags`, `googlelog`, `sparsemap`, `fmt`, `xxhash`, `folly`, `fizz`,
118119
`wangle`, `fbthrift`.
119120
120121
In some cases the operating system has a pre-packaged version of some
@@ -146,6 +147,7 @@ options:
146147
-v verbose build
147148
148149
NAME: the dependency to build supported values are:
150+
zstd, xxhash,
149151
googlelog, googleflags, googletest,
150152
fmt, sparsemap,
151153
folly, fizz, wangle, fbthrift,

build/fbcode_builder/manifests/cachelib

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ mvfst
2626
numa
2727
libaio
2828
magic_enum
29+
xxhash
2930
# cachelib also depends on openssl but since the latter requires a platform-
3031
# specific configuration we rely on the folly manifest to provide this
3132
# dependency to avoid duplication.

cachelib/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ find_package(FBThrift REQUIRED) # must come after wangle
123123
find_package(NUMA REQUIRED)
124124
find_package(Sparsemap REQUIRED)
125125
find_package(magic_enum CONFIG REQUIRED)
126+
find_package(Xxhash REQUIRED)
126127

127128
find_package(uring)
128129
if (NOT uring_FOUND)

cachelib/shm/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ add_dependencies(cachelib_shm thrift_generated_files)
2525
target_link_libraries(cachelib_shm PUBLIC
2626
cachelib_common
2727
NUMA::NUMA
28+
${Xxhash_LIBRARY}
2829
)
2930

3031
install(TARGETS cachelib_shm

contrib/build-package.sh

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ options:
5757
-v verbose build
5858
5959
NAME: the dependency to build supported values are:
60-
zstd
60+
zstd, xxhash,
6161
googlelog, googleflags, googletest,
6262
fmt, sparsemap,
6363
folly, fizz, wangle, mvfst, fbthrift,
@@ -195,6 +195,16 @@ case "$1" in
195195
external_git_clone=yes
196196
;;
197197

198+
xxhash)
199+
NAME=xxhash
200+
REPO=https://github.com/Cyan4973/xxHash.git
201+
REPODIR=cachelib/external/$NAME
202+
SRCDIR=$REPODIR/cmake_unofficial
203+
external_git_clone=yes
204+
external_git_tag="v0.8.2"
205+
cmake_custom_params="-DBUILD_SHARED_LIBS=ON"
206+
;;
207+
198208
folly)
199209
NAME=folly
200210
SRCDIR=cachelib/external/$NAME

contrib/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ build_arch()
9595

9696
build_dependencies()
9797
{
98-
for pkg in zstd googleflags googlelog googletest sparsemap fmt folly fizz wangle mvfst fbthrift ;
98+
for pkg in zstd xxhash googleflags googlelog googletest sparsemap fmt folly fizz wangle mvfst fbthrift ;
9999
do
100100
# shellcheck disable=SC2086
101101
./contrib/build-package.sh $pass_params "$pkg" \

0 commit comments

Comments
 (0)