| --- a/BUILD.bazel 2023-10-12 10:16:38.235186234 -0700 |
| +++ b/BUILD.bazel 2023-10-12 10:20:50.453525859 -0700 |
| @@ -3,105 +3,28 @@ |
| licenses(["notice"]) |
| |
| exports_files(glob(["*LICENSE*"])) |
| + |
| load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test") |
| |
| +cc_library( |
| + name = "zstd-c", |
| + srcs = glob([ |
| + "*.c", |
| + "*.S", |
| + ]), |
| + hdrs = glob(["*.h"]), |
| +) |
| + |
| go_library( |
| name = "zstd", |
| srcs = [ |
| - "allocations.h", |
| - "bits.h", |
| - "bitstream.h", |
| - "clevels.h", |
| - "compiler.h", |
| - "cover.c", |
| - "cover.h", |
| - "cpu.h", |
| - "debug.c", |
| - "debug.h", |
| - "divsufsort.c", |
| - "divsufsort.h", |
| - "entropy_common.c", |
| - "error_private.c", |
| - "error_private.h", |
| "errors.go", |
| - "fastcover.c", |
| - "fse.h", |
| - "fse_compress.c", |
| - "fse_decompress.c", |
| - "hist.c", |
| - "hist.h", |
| - "huf.h", |
| - "huf_compress.c", |
| - "huf_decompress.c", |
| - "huf_decompress_amd64.S", |
| - "mem.h", |
| - "pool.c", |
| - "pool.h", |
| - "portability_macros.h", |
| - "threading.c", |
| - "threading.h", |
| - "xxhash.c", |
| - "xxhash.h", |
| - "zbuff.h", |
| - "zbuff_common.c", |
| - "zbuff_compress.c", |
| - "zbuff_decompress.c", |
| - "zdict.c", |
| - "zdict.h", |
| "zstd.go", |
| - "zstd.h", |
| "zstd_bulk.go", |
| - "zstd_common.c", |
| - "zstd_compress.c", |
| - "zstd_compress_internal.h", |
| - "zstd_compress_literals.c", |
| - "zstd_compress_literals.h", |
| - "zstd_compress_sequences.c", |
| - "zstd_compress_sequences.h", |
| - "zstd_compress_superblock.c", |
| - "zstd_compress_superblock.h", |
| "zstd_ctx.go", |
| - "zstd_cwksp.h", |
| - "zstd_ddict.c", |
| - "zstd_ddict.h", |
| - "zstd_decompress.c", |
| - "zstd_decompress_block.c", |
| - "zstd_decompress_block.h", |
| - "zstd_decompress_internal.h", |
| - "zstd_deps.h", |
| - "zstd_double_fast.c", |
| - "zstd_double_fast.h", |
| - "zstd_errors.h", |
| - "zstd_fast.c", |
| - "zstd_fast.h", |
| - "zstd_internal.h", |
| - "zstd_lazy.c", |
| - "zstd_lazy.h", |
| - "zstd_ldm.c", |
| - "zstd_ldm.h", |
| - "zstd_ldm_geartab.h", |
| - "zstd_legacy.h", |
| - "zstd_opt.c", |
| - "zstd_opt.h", |
| "zstd_stream.go", |
| - "zstd_trace.h", |
| - "zstd_v01.c", |
| - "zstd_v01.h", |
| - "zstd_v02.c", |
| - "zstd_v02.h", |
| - "zstd_v03.c", |
| - "zstd_v03.h", |
| - "zstd_v04.c", |
| - "zstd_v04.h", |
| - "zstd_v05.c", |
| - "zstd_v05.h", |
| - "zstd_v06.c", |
| - "zstd_v06.h", |
| - "zstd_v07.c", |
| - "zstd_v07.h", |
| - "zstdmt_compress.c", |
| - "zstdmt_compress.h", |
| ], |
| + cdeps = [":zstd-c"], |
| cgo = True, |
| copts = ["-DZSTD_LEGACY_SUPPORT=4 -DZSTD_MULTITHREAD=1"], |
| importpath = "github.com/DataDog/zstd", |