Update BUCK files

* Correct XXH namespace (Fixes #901)
* Multithreading always enabled
* GZIP/LZ4/LZMA always enabled
* Legacy support always fully enabled
This commit is contained in:
Nick Terrell 2017-10-25 12:47:57 -07:00
parent 97dccbbb2b
commit b495140f67
3 changed files with 43 additions and 41 deletions

View File

@ -15,15 +15,9 @@ cxx_library(
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'],
)
@ -31,7 +25,7 @@ cxx_library(
name='decompress',
header_namespace='',
visibility=['PUBLIC'],
srcs=['decompress/zstd_decompress.c'],
srcs=glob(['decompress/zstd*.c']),
deps=[
':common',
':legacy',
@ -58,6 +52,9 @@ cxx_library(
]),
srcs=glob(['legacy/*.c']),
deps=[':common'],
exported_preprocessor_flags=[
'-DZSTD_LEGACY_SUPPORT=4',
],
)
cxx_library(
@ -74,6 +71,15 @@ 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='',
@ -100,6 +106,7 @@ cxx_library(
],
deps=[
':bitstream',
':compiler',
':errors',
':mem',
],
@ -133,7 +140,10 @@ cxx_library(
('common', 'pool.h'),
]),
srcs=['common/pool.c'],
deps=[':threading'],
deps=[
':threading',
':zstd_common',
],
)
cxx_library(
@ -144,6 +154,12 @@ cxx_library(
('common', 'threading.h'),
]),
srcs=['common/threading.c'],
exported_preprocessor_flags=[
'-DZSTD_MULTITHREAD',
],
exported_linker_flags=[
'-pthread',
],
)
cxx_library(
@ -154,6 +170,9 @@ cxx_library(
('common', 'xxhash.h'),
]),
srcs=['common/xxhash.c'],
exported_preprocessor_flags=[
'-DXXH_NAMESPACE=ZSTD_',
],
)
cxx_library(
@ -166,6 +185,7 @@ cxx_library(
]),
srcs=['common/zstd_common.c'],
deps=[
':compiler',
':errors',
':mem',
],
@ -175,6 +195,7 @@ cxx_library(
name='common',
deps=[
':bitstream',
':compiler',
':entropy',
':errors',
':mem',

View File

@ -10,38 +10,19 @@ cxx_binary(
'//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(

View File

@ -12,7 +12,7 @@ cxx_library(
deps=[
'//lib:zstd',
'//lib:zstd_common',
]
],
)
cxx_binary(