The C benchmark translation unit still contained the complete BMK implementation, so program builds and paramgrill could silently keep using a second C implementation even though rust/src/benchzstd.rs already provided the same ABI. Replace that duplicate with a declaration-only shim and retain compile-time checks for the by-value result and parameter layouts. The standalone test tools do not link the full CLI archive. Keep their helpers archive free of the benchmark and trace-only objects, and add a separate benchmark archive for paramgrill so the shim remains linkable without pulling program-only trace dependencies into datagen and similar targets. Test Plan: - `cargo test --manifest-path rust/cli/Cargo.toml --no-default-features --features cli,compression,decompression,benchmark,dict-builder --lib -- --test-threads=1` -- 165 passed - `make -B -C programs -j2 zstd` -- passed - `./programs/zstd -b1 tests/hello` -- passed - `make -B -C tests paramgrill` -- passed - `./tests/paramgrill -S tests/hello` -- passed - `make -C tests -j2 test-fullbench` -- passed - targeted Rust clippy and nightly rustfmt checks -- passed - full all-target clippy remains blocked by pre-existing test-only lints in `zstd_compress.rs` and `fileio_backend.rs`
32 lines
881 B
Rust
32 lines
881 B
Rust
#[cfg(any(feature = "benchmark", feature = "helpers"))]
|
|
#[path = "../../src/benchfn.rs"]
|
|
mod benchfn;
|
|
#[cfg(feature = "benchmark")]
|
|
#[path = "../../src/benchzstd.rs"]
|
|
mod benchzstd;
|
|
#[cfg(any(feature = "benchmark", feature = "helpers"))]
|
|
#[path = "../../src/datagen.rs"]
|
|
mod datagen;
|
|
#[cfg(all(feature = "cli", feature = "dict-builder"))]
|
|
#[path = "../../src/dibio.rs"]
|
|
mod dibio;
|
|
#[cfg(feature = "cli")]
|
|
#[path = "../../src/fileio_backend.rs"]
|
|
mod fileio_backend;
|
|
#[cfg(feature = "cli")]
|
|
#[path = "../../src/fileio_prefs.rs"]
|
|
mod fileio_prefs;
|
|
#[cfg(any(feature = "benchmark", feature = "helpers"))]
|
|
#[path = "../../src/lorem.rs"]
|
|
mod lorem;
|
|
#[path = "../../src/timefn.rs"]
|
|
mod timefn;
|
|
#[path = "../../src/util.rs"]
|
|
mod util;
|
|
#[cfg(feature = "cli")]
|
|
#[path = "../../src/zstd_cli.rs"]
|
|
mod zstd_cli;
|
|
#[cfg(feature = "cli")]
|
|
#[path = "../../src/zstdcli_trace.rs"]
|
|
mod zstdcli_trace;
|