1
0
Fork 0
mirror of https://github.com/ton-blockchain/ton synced 2025-03-09 15:40:10 +00:00

lz4 support in multiple builds (#946)

* Compress block candidates in validator-session

* Compress blocks in full-node (disabled for now)

* test pipeline with lz4

* tonlib compilation required lz4;
try win compile;

* install lz4 on mac.

* wip, test builds

* remove FindLZ4.cmake

* fix typo

* fix wasm lz4 path

* increase groovy timeout to 120 sec

* add lz4 for android and emscripten builds

* add lz4 for android and emscripten builds

* fix win build include path for lz4

* add precompiled lz4 for android

* cleanup

* adjust android include dir for lz4

* fix path for android arm of lz4

* cleanup

* minor fix

---------

Co-authored-by: SpyCheese <mikle98@yandex.ru>
This commit is contained in:
neodix42 2024-03-28 11:18:11 +04:00 committed by GitHub
parent 10487b1c71
commit b7849249c6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
38 changed files with 11004 additions and 68 deletions

View file

@ -4,6 +4,7 @@ pushd .
SECP256K1_INCLUDE_DIR=$(pwd)/third_party/secp256k1/include
OPENSSL_DIR=$(pwd)/third_party/crypto/
LZ4_INCLUDE_DIR=$(pwd)/third_party/lz4/include
if [ $ARCH == "arm" ]
then
@ -12,6 +13,7 @@ then
SODIUM_LIBRARY_RELEASE=$(pwd)/third_party/libsodium/libsodium-android-armv7-a/lib/libsodium.a
SECP256K1_LIBRARY=$(pwd)/third_party/secp256k1/armv7/libsecp256k1.a
BLST_LIBRARY=$(pwd)/third_party/blst/armv7/libblst.a
LZ4_LIBRARY=$(pwd)/third_party/lz4/armv7/liblz4.a
elif [ $ARCH == "x86" ]
then
ABI=$ARCH
@ -19,6 +21,7 @@ then
SODIUM_LIBRARY_RELEASE=$(pwd)/third_party/libsodium/libsodium-android-i686/lib/libsodium.a
SECP256K1_LIBRARY=$(pwd)/third_party/secp256k1/i686/libsecp256k1.a
BLST_LIBRARY=$(pwd)/third_party/blst/i686/libblst.a
LZ4_LIBRARY=$(pwd)/third_party/lz4/i686/liblz4.a
TARGET=i686-linux-android21
elif [ $ARCH == "x86_64" ]
then
@ -27,6 +30,7 @@ then
SODIUM_LIBRARY_RELEASE=$(pwd)/third_party/libsodium/libsodium-android-westmere/lib/libsodium.a
SECP256K1_LIBRARY=$(pwd)/third_party/secp256k1/x86-64/libsecp256k1.a
BLST_LIBRARY=$(pwd)/third_party/blst/x86-64/libblst.a
LZ4_LIBRARY=$(pwd)/third_party/lz4/x86-64/liblz4.a
elif [ $ARCH == "arm64" ]
then
ABI="arm64-v8a"
@ -34,6 +38,7 @@ then
SODIUM_LIBRARY_RELEASE=$(pwd)/third_party/libsodium/libsodium-android-armv8-a/lib/libsodium.a
SECP256K1_LIBRARY=$(pwd)/third_party/secp256k1/armv8/libsecp256k1.a
BLST_LIBRARY=$(pwd)/third_party/blst/armv8/libblst.a
LZ4_LIBRARY=$(pwd)/third_party/lz4/armv8/liblz4.a
fi
ORIG_ARCH=$ARCH
@ -56,6 +61,9 @@ cmake .. -GNinja \
-DSECP256K1_FOUND=1 \
-DSECP256K1_INCLUDE_DIR=${SECP256K1_INCLUDE_DIR} \
-DSECP256K1_LIBRARY=${SECP256K1_LIBRARY} \
-DLZ4_FOUND=1 \
-DLZ4_INCLUDE_DIRS=${LZ4_INCLUDE_DIR} \
-DLZ4_LIBRARIES=${LZ4_LIBRARY} \
-DSODIUM_INCLUDE_DIR=${SODIUM_INCLUDE_DIR} \
-DSODIUM_LIBRARY_RELEASE=${SODIUM_LIBRARY_RELEASE} \
-DSODIUM_USE_STATIC_LIBS=1 \