Skip to content

Commit

Permalink
[dependency](xxhash) Add xxhash lib (apache#12566)
Browse files Browse the repository at this point in the history
Add xxhash lib for BE, which is the faster hash method by test.
  • Loading branch information
HappenLee authored Sep 14, 2022
1 parent fd0cf78 commit a219a41
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 0 deletions.
1 change: 1 addition & 0 deletions dist/LICENSE-dist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1570,3 +1570,4 @@ Other dependencies:
* pdqsort: 0.0.0+git20180419 -- license/LICENSE-pdqsort.txt
* breakpad@38ee0be -- license/LICENSE-breakpod.txt
* xsimd: xmid@e9234cd6 -- license/LICENSE-xsimd.txt
* xxhash: 0.8.1 -- license/LICENSE-xxhash.txt
26 changes: 26 additions & 0 deletions dist/licenses/LICENSE-xxhash.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
xxHash Library
Copyright (c) 2012-2021 Yann Collet
All rights reserved.

BSD 2-Clause License (https://www.opensource.org/licenses/bsd-license.php)

Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above copyright notice, this
list of conditions and the following disclaimer in the documentation and/or
other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
11 changes: 11 additions & 0 deletions thirdparty/build-thirdparty.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1382,6 +1382,16 @@ build_sse2neon() {
cp sse2neon.h "${TP_INSTALL_DIR}/include/"
}

# xxhash
build_xxhash() {
check_if_source_exist "${XXHASH_SOURCE}"
cd "${TP_SOURCE_DIR}/${XXHASH_SOURCE}"

make -j "${PARALLEL}"
cp -r ./*.h "${TP_INSTALL_DIR}/include/"
cp libxxhash.a "${TP_INSTALL_DIR}/lib64"
}

build_libunixodbc
build_openssl
build_libevent
Expand Down Expand Up @@ -1434,5 +1444,6 @@ build_nlohmann_json
build_opentelemetry
build_libbacktrace
build_sse2neon
build_xxhash

echo "Finished to build all thirdparties"
7 changes: 7 additions & 0 deletions thirdparty/vars.sh
Original file line number Diff line number Diff line change
Expand Up @@ -423,6 +423,12 @@ SSE2NEON_NAME=sse2neon-1.5.1.tar.gz
SSE2NEON_SOURCE=sse2neon-1.5.1
SSE2NEON_MD5SUM="9de5dc2970aa7efac7faee59e2826c51"

# xxhash
XXHASH_DOWNLOAD="https://github.com/Cyan4973/xxHash/archive/refs/tags/v0.8.1.tar.gz"
XXHASH_NAME=xxHash-0.8.1.tar.gz
XXHASH_SOURCE=xxHash-0.8.1
XXHASH_MD5SUM="b67c587f5ff4894253da0095ba7ea393"

# all thirdparties which need to be downloaded is set in array TP_ARCHIVES
export TP_ARCHIVES=(
'LIBEVENT'
Expand Down Expand Up @@ -484,4 +490,5 @@ export TP_ARCHIVES=(
'OPENTELEMETRY'
'LIBBACKTRACE'
'SSE2NEON'
'XXHASH'
)

0 comments on commit a219a41

Please sign in to comment.