fix(build): gate CLI dictionary builder by feature
Keep dictionary-training code out of compressor-only and decompressor-only CLI archives, where its ZDICT symbols are intentionally absent. Add a dedicated Rust CLI archive for zstd-dictBuilder, enable the builder feature only for the full and dictionary-builder programs, and make reduced-feature help use the feature-independent max-level helper. Test Plan: - cargo test --manifest-path rust/cli/Cargo.toml --lib -- --test-threads=1 (158 passed) - cargo test --manifest-path rust/cli/Cargo.toml --no-default-features --features cli,compression,dict-builder --lib -- --test-threads=1 (124 passed) - cargo clippy --manifest-path rust/cli/Cargo.toml --lib -- -D warnings - cargo clippy --manifest-path rust/cli/Cargo.toml --no-default-features --features cli,compression,dict-builder --lib -- -D warnings - make -C programs -j2 zstd zstd-small zstd-frugal zstd-decompress zstd-compress zstd-dictBuilder - git diff --check
This commit is contained in:
@@ -14,6 +14,7 @@ default = ["cli", "compression", "decompression", "benchmark"]
|
||||
cli = []
|
||||
compression = []
|
||||
decompression = []
|
||||
dict-builder = ["compression"]
|
||||
helpers = []
|
||||
# The integrated benchmark archive is optional so zstd-small and zstd-frugal
|
||||
# can omit every benchmark implementation and its timing/data-generator
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ mod benchzstd;
|
||||
#[cfg(any(feature = "benchmark", feature = "helpers"))]
|
||||
#[path = "../../src/datagen.rs"]
|
||||
mod datagen;
|
||||
#[cfg(feature = "cli")]
|
||||
#[cfg(all(feature = "cli", feature = "dict-builder"))]
|
||||
#[path = "../../src/dibio.rs"]
|
||||
mod dibio;
|
||||
#[cfg(feature = "cli")]
|
||||
|
||||
Reference in New Issue
Block a user