Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
120 changes: 67 additions & 53 deletions BUCK
Original file line number Diff line number Diff line change
Expand Up @@ -8,29 +8,33 @@ oncall("data_compression")

zs_library(
name = "config",
headers = public_headers(glob([
"include/openzl/zl_config.h",
"include/zstrong/zs2_config.h",
])),
headers = public_headers(
glob([
"include/openzl/zl_config.h",
"include/zstrong/zs2_config.h",
])
),
header_namespace = "",
)

zs_library(
name = "public_headers",
headers = public_headers(glob(
[
"include/openzl/*.h",
"include/openzl/codecs/**/*.h",
"include/openzl/detail/**/*.h",
"include/zstrong/*.h",
"include/zstrong/codecs/**/*.h",
"include/zstrong/detail/**/*.h",
],
exclude = [
"include/openzl/zl_config.h",
"include/zstrong/zs2_config.h",
],
)),
headers = public_headers(
glob(
[
"include/openzl/*.h",
"include/openzl/codecs/**/*.h",
"include/openzl/detail/**/*.h",
"include/zstrong/*.h",
"include/zstrong/codecs/**/*.h",
"include/zstrong/detail/**/*.h",
],
exclude = [
"include/openzl/zl_config.h",
"include/zstrong/zs2_config.h",
],
)
),
header_namespace = "",
propagated_pp_flags = [
zl_fbcode_is_release_pp_flag(),
Expand All @@ -55,18 +59,20 @@ zs_library(
"src/zstrong/transforms/**/graph_*.c",
"src/zstrong/shared/**/*.c",
]),
headers = private_headers(glob([
"src/openzl/common/**/*.h",
"src/openzl/codecs/common/**/*.h",
"src/openzl/codecs/**/common_*.h",
"src/openzl/codecs/**/graph_*.h",
"src/openzl/shared/**/*.h",
"src/zstrong/common/**/*.h",
"src/zstrong/transforms/common/**/*.h",
"src/zstrong/transforms/**/common_*.h",
"src/zstrong/transforms/**/graph_*.h",
"src/zstrong/shared/**/*.h",
])),
headers = private_headers(
glob([
"src/openzl/common/**/*.h",
"src/openzl/codecs/common/**/*.h",
"src/openzl/codecs/**/common_*.h",
"src/openzl/codecs/**/graph_*.h",
"src/openzl/shared/**/*.h",
"src/zstrong/common/**/*.h",
"src/zstrong/transforms/common/**/*.h",
"src/zstrong/transforms/**/common_*.h",
"src/zstrong/transforms/**/graph_*.h",
"src/zstrong/shared/**/*.h",
])
),
header_namespace = "",
exported_deps = [
":config",
Expand All @@ -88,14 +94,16 @@ zs_library(
"src/zstrong/transforms/**/encode_*.c",
"src/zstrong/transforms/encoder_registry.c",
]),
headers = private_headers(glob([
"src/openzl/compress/**/*.h",
"src/openzl/codecs/**/encode_*.h",
"src/openzl/codecs/encoder_registry.h",
"src/zstrong/compress/**/*.h",
"src/zstrong/transforms/**/encode_*.h",
"src/zstrong/transforms/encoder_registry.h",
])),
headers = private_headers(
glob([
"src/openzl/compress/**/*.h",
"src/openzl/codecs/**/encode_*.h",
"src/openzl/codecs/encoder_registry.h",
"src/zstrong/compress/**/*.h",
"src/zstrong/transforms/**/encode_*.h",
"src/zstrong/transforms/encoder_registry.h",
])
),
header_namespace = "",
compiler_flags = [
# "-mavx2",
Expand Down Expand Up @@ -124,14 +132,16 @@ zs_library(
"src/zstrong/transforms/**/decode_*.c",
"src/zstrong/transforms/decoder_registry.c",
]),
headers = private_headers(glob([
"src/openzl/decompress/**/*.h",
"src/openzl/codecs/**/decode_*.h",
"src/openzl/codecs/decoder_registry.h",
"src/zstrong/decompress/**/*.h",
"src/zstrong/transforms/**/decode_*.h",
"src/zstrong/transforms/decoder_registry.h",
])),
headers = private_headers(
glob([
"src/openzl/decompress/**/*.h",
"src/openzl/codecs/**/decode_*.h",
"src/openzl/codecs/decoder_registry.h",
"src/zstrong/decompress/**/*.h",
"src/zstrong/transforms/**/decode_*.h",
"src/zstrong/transforms/decoder_registry.h",
])
),
header_namespace = "",
deps = [
"fbsource//third-party/lz4:lz4",
Expand All @@ -151,9 +161,11 @@ zs_library(
srcs = glob([
"src/openzl/dict/**/*.c",
]),
headers = private_headers(glob([
"src/openzl/dict/**/*.h",
])),
headers = private_headers(
glob([
"src/openzl/dict/**/*.h",
])
),
header_namespace = "",
deps = [
":common",
Expand Down Expand Up @@ -203,10 +215,12 @@ zs_library(
"ovr_config//compiler:msvc": [],
}),
}),
headers = private_headers(glob([
"src/openzl/fse/**/*.h",
"src/zstrong/fse/**/*.h",
])),
headers = private_headers(
glob([
"src/openzl/fse/**/*.h",
"src/zstrong/fse/**/*.h",
])
),
header_namespace = "",
exported_deps = [
"fbsource//xplat/secure_lib:secure_string",
Expand Down
25 changes: 14 additions & 11 deletions benchmark/BUCK
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,20 @@ SRC_FILE_FLAGS = {

zs_cxxbinary(
name = "benchmark",
srcs = [(
src_file,
SRC_FILE_FLAGS.get(src_file, []),
) for src_file in glob(
[
"**/*.cpp",
],
exclude = [
"BenchmarkComponents.cpp",
],
)],
srcs = [
(
src_file,
SRC_FILE_FLAGS.get(src_file, []),
)
for src_file in glob(
[
"**/*.cpp",
],
exclude = [
"BenchmarkComponents.cpp",
],
)
],
headers = glob([
"**/*.h",
]),
Expand Down
3 changes: 1 addition & 2 deletions cli/tests/BUCK
Original file line number Diff line number Diff line change
Expand Up @@ -419,8 +419,7 @@ python_library(
base_module = "",
resources = glob(["sample_files/**/*"]) + glob(["profile_files/**/*"]),
typing = True,
deps = [
],
deps = [],
)

custom_unittest(
Expand Down
16 changes: 10 additions & 6 deletions cpp/BUCK
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,17 @@ cpp_library(
srcs = glob([
"src/**/*.cpp",
]),
headers = public_headers(glob([
"include/**/*.hpp",
])),
headers = public_headers(
glob([
"include/**/*.hpp",
])
),
header_namespace = "",
private_headers = private_headers(glob([
"src/**/*.hpp",
])),
private_headers = private_headers(
glob([
"src/**/*.hpp",
])
),
exported_deps = [
"..:zstronglib",
],
Expand Down
8 changes: 5 additions & 3 deletions cpp/tests/BUCK
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@ cpp_unittest(
srcs = glob([
"**/*.cpp",
]),
headers = relative_headers(glob([
"**/*.hpp",
])),
headers = relative_headers(
glob([
"**/*.hpp",
])
),
header_namespace = "",
labels = cross_platform_labels(),
deps = [
Expand Down
21 changes: 13 additions & 8 deletions doc/mkdocs/BUCK
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,19 @@ buck_genrule(
name = "static_docs",
out = "static_docs.sh",
cmd = (
"echo -e {0} > $OUT && chmod +x $OUT"
.format(shell.quote("\n".join([
"#!/bin/bash",
"SCRIPT=\\$(readlink -f $0)",
"SCRIPTPATH=\\$(dirname $SCRIPT)",
"cd $SCRIPTPATH",
"$(location :static_docs_build_script) --pwd \\$(hg root)/fbcode/openzl/{}/doc/mkdocs --use-system-python-extension --test".format(BRANCH_NAME),
])))
"echo -e {0} > $OUT && chmod +x $OUT".format(
shell.quote(
"\n".join([
"#!/bin/bash",
"SCRIPT=\\$(readlink -f $0)",
"SCRIPTPATH=\\$(dirname $SCRIPT)",
"cd $SCRIPTPATH",
"$(location :static_docs_build_script) --pwd \\$(hg root)/fbcode/openzl/{}/doc/mkdocs --use-system-python-extension --test".format(
BRANCH_NAME
),
])
)
)
),
)

Expand Down
9 changes: 6 additions & 3 deletions tests/BUCK
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ zs_unittest(
["round_trip/**/*.cpp"],
exclude = ["round_trip/test_mlselector.cpp"],
),
headers = glob(["round_trip/**/*.h"]) + [
headers = glob(["round_trip/**/*.h"])
+ [
"compress/graphs/sddl2/utils.h",
],
labels = cross_platform_labels(),
Expand Down Expand Up @@ -300,7 +301,8 @@ zs_fuzzers(
("LargeInputTest", "FuzzSerialTransform"),
("LargeInputTest", "FuzzSerialGraph"),
],
deps = FUZZER_DEPS + [
deps = FUZZER_DEPS
+ [
"datagen:custom_nodes",
],
)
Expand Down Expand Up @@ -361,7 +363,8 @@ zs_fuzzers(
("MultiInputTest", "FuzzClusterRoundTrip"),
("MLSelectorMultiInputTest", "FuzzMLSelectorRoundTrip"),
],
deps = FUZZER_DEPS + [
deps = FUZZER_DEPS
+ [
":ml_selector_utils",
],
)
Expand Down
3 changes: 2 additions & 1 deletion tests/registry/BUCK
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ zs_cxxlibrary(
name = "openzl_components",
srcs = [
"OpenZLComponents.cpp",
] + glob([
]
+ glob([
"components/*.cpp",
]),
headers = ["OpenZLComponents.h"],
Expand Down
21 changes: 9 additions & 12 deletions tools/training/BUCK
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,12 @@ oncall("data_compression")

zs_cxxlibrary(
name = "train",
srcs =
[
"train.cpp",
],
headers =
[
"train.h",
],
srcs = [
"train.cpp",
],
headers = [
"train.h",
],
deps = [
"../../custom_parsers:custom_parsers",
"../ml_selector:ml_selector_trainer",
Expand All @@ -31,10 +29,9 @@ zs_cxxlibrary(
# TODO: Clean up the BUCK rules in this directory
zs_cxxlibrary(
name = "train_common",
headers =
[
"train_params.h",
],
headers = [
"train_params.h",
],
deps = [
"../../cpp:openzl_cpp",
],
Expand Down
Loading
Loading