header_namespace='',
visibility=['PUBLIC'],
exported_headers=subdir_glob([
- ('compress', 'zstdmt_compress.h'),
+ ('compress', 'zstd*.h'),
]),
- headers=subdir_glob([
- ('compress', 'zstd_opt.h'),
- ]),
- srcs=[
- 'compress/zstd_compress.c',
- 'compress/zstdmt_compress.c',
- ],
+ srcs=glob(['compress/zstd*.c']),
deps=[':common'],
)
name='decompress',
header_namespace='',
visibility=['PUBLIC'],
- srcs=['decompress/zstd_decompress.c'],
+ srcs=glob(['decompress/zstd*.c']),
deps=[
':common',
':legacy',
]),
srcs=glob(['legacy/*.c']),
deps=[':common'],
+ exported_preprocessor_flags=[
+ '-DZSTD_LEGACY_SUPPORT=4',
+ ],
)
cxx_library(
deps=[':common'],
)
+cxx_library(
+ name='compiler',
+ header_namespace='',
+ visibility=['PUBLIC'],
+ exported_headers=subdir_glob([
+ ('common', 'compiler.h'),
+ ]),
+)
+
cxx_library(
name='bitstream',
header_namespace='',
],
deps=[
':bitstream',
+ ':compiler',
':errors',
':mem',
],
('common', 'pool.h'),
]),
srcs=['common/pool.c'],
- deps=[':threading'],
+ deps=[
+ ':threading',
+ ':zstd_common',
+ ],
)
cxx_library(
('common', 'threading.h'),
]),
srcs=['common/threading.c'],
+ exported_preprocessor_flags=[
+ '-DZSTD_MULTITHREAD',
+ ],
+ exported_linker_flags=[
+ '-pthread',
+ ],
)
cxx_library(
('common', 'xxhash.h'),
]),
srcs=['common/xxhash.c'],
+ exported_preprocessor_flags=[
+ '-DXXH_NAMESPACE=ZSTD_',
+ ],
)
cxx_library(
]),
srcs=['common/zstd_common.c'],
deps=[
+ ':compiler',
':errors',
':mem',
],
name='common',
deps=[
':bitstream',
+ ':compiler',
':entropy',
':errors',
':mem',
'//lib:mem',
'//lib:xxhash',
],
-)
-
-cxx_binary(
- name='zstdmt',
- headers=glob(['*.h'], excludes=['datagen.h', 'platform.h', 'util.h']),
- srcs=glob(['*.c'], excludes=['datagen.c']),
- deps=[
- ':datagen',
- ':util',
- '//lib:zstd',
- '//lib:zdict',
- '//lib:mem',
- '//lib:xxhash',
+ preprocessor_flags=[
+ '-DZSTD_GZCOMPRESS',
+ '-DZSTD_GZDECOMPRESS',
+ '-DZSTD_LZMACOMPRESS',
+ '-DZSTD_LZMADECOMPRES',
+ '-DZSTD_LZ4COMPRESS',
+ '-DZSTD_LZ4DECOMPRES',
],
- preprocessor_flags=['-DZSTD_MULTITHREAD'],
- linker_flags=['-lpthread'],
-)
-
-cxx_binary(
- name='gzstd',
- headers=glob(['*.h'], excludes=['datagen.h', 'platform.h', 'util.h']),
- srcs=glob(['*.c'], excludes=['datagen.c']),
- deps=[
- ':datagen',
- ':util',
- '//lib:zstd',
- '//lib:zdict',
- '//lib:mem',
- '//lib:xxhash',
+ linker_flags=[
+ '-lz',
+ '-llzma',
+ '-llz4',
],
- preprocessor_flags=['-DZSTD_GZDECOMPRESS'],
- linker_flags=['-lz'],
)
cxx_library(