[zstd] Add libzstd

Adding libzstd from Zstandard release 1.5.3
This commit is contained in:
Justin C. Miller
2023-01-17 15:34:05 -08:00
parent 1b0c0b6dbe
commit 3af2d41a7f
47 changed files with 23361 additions and 2 deletions

View File

@@ -22,6 +22,6 @@ typedef long double max_align_t;
typedef long long max_align_t;
#endif
#define offsetof(x, y) __builtin_offsetof((x), (y))
#define offsetof(x, y) __builtin_offsetof(x, y)
#define NULL ((void*)0)

View File

@@ -0,0 +1,33 @@
# vim: ft=python
zstd = module("zstd",
root = "${source_root}/external/zstd",
kind = "lib",
deps = [ "libc" ],
output = "libzstd.a",
sources = [
"decompress/zstd_decompress.c",
"decompress/zstd_ddict.c",
"decompress/huf_decompress.c",
"decompress/zstd_decompress_block.c",
"common/threading.c",
"common/fse_decompress.c",
"common/debug.c",
"common/xxhash.c",
"common/pool.c",
"common/error_private.c",
"common/entropy_common.c",
"common/zstd_common.c",
],
public_headers = [
"zdict.h",
"zstd.h",
"zstd_errors.h",
])
zstd.variables['ccflags'] = [
"${ccflags}",
"-DXXH_NAMESPACE=ZSTD_",
"-DDEBUGLEVEL=0",
"-DZSTD_DISABLE_ASM",
]