tools: zstd: override max safe compression level

ZTSD limits the safe compression level to a max of 19 as 20 to 22 cause
increased RAM usage. Higher levels require --ultra arg passed.

There isn't currently a way to set --ultra using ENV options similar to
ZSTD_CLEVEL and ZSTD_CLEVEL is limited to 19.

To fix this, we can increase the max safe compression level by providing
a custom ZSTDCLI_CLEVEL_MAX value with CFLAGS.

The max safe level is increased to 20.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
This commit is contained in:
Christian Marangi 2024-04-05 14:29:50 +02:00 committed by Robert Marko
parent 4b920e799f
commit ed149717ee
1 changed files with 3 additions and 0 deletions

View File

@ -17,6 +17,9 @@ include $(INCLUDE_DIR)/host-build.mk
HOSTCC:= $(HOSTCC_NOCACHE)
HOST_CFLAGS += \
-DZSTDCLI_CLEVEL_MAX=20
HOST_MAKE_FLAGS += \
ZSTD_LEGACY_SUPPORT=7 \
BACKTRACE=0 \