Enable producing endianness-independent output in lz4

This commit is contained in:
ltrk2 2023-08-24 13:55:13 -07:00
parent 1eff7bee5e
commit 394179f44f
3 changed files with 7 additions and 2 deletions

2
.gitmodules vendored
View File

@ -3,7 +3,7 @@
url = https://github.com/facebook/zstd url = https://github.com/facebook/zstd
[submodule "contrib/lz4"] [submodule "contrib/lz4"]
path = contrib/lz4 path = contrib/lz4
url = https://github.com/lz4/lz4 url = https://github.com/ClickHouse/lz4
[submodule "contrib/librdkafka"] [submodule "contrib/librdkafka"]
path = contrib/librdkafka path = contrib/librdkafka
url = https://github.com/ClickHouse/librdkafka url = https://github.com/ClickHouse/librdkafka

2
contrib/lz4 vendored

@ -1 +1 @@
Subproject commit e82198428c8061372d5adef1f9bfff4203f6081e Subproject commit 92ebf1870b9acbefc0e7970409a181954a10ff40

View File

@ -13,6 +13,11 @@ add_library (ch_contrib::lz4 ALIAS _lz4)
target_compile_definitions (_lz4 PUBLIC LZ4_DISABLE_DEPRECATE_WARNINGS=1) target_compile_definitions (_lz4 PUBLIC LZ4_DISABLE_DEPRECATE_WARNINGS=1)
target_compile_definitions (_lz4 PUBLIC LZ4_FAST_DEC_LOOP=1) target_compile_definitions (_lz4 PUBLIC LZ4_FAST_DEC_LOOP=1)
if(ARCH_S390X)
target_compile_definitions(_lz4 PRIVATE LZ4_STATIC_LINKING_ONLY_ENDIANNESS_INDEPENDENT_OUTPUT)
endif()
if (SANITIZE STREQUAL "undefined") if (SANITIZE STREQUAL "undefined")
target_compile_options (_lz4 PRIVATE -fno-sanitize=undefined) target_compile_options (_lz4 PRIVATE -fno-sanitize=undefined)
endif () endif ()