Optimize blake3 in Bazel fastbuilds (#48197)

Daemon tests repeatedly hash large CLI binaries, even in `fastbuild` mode.
Set `blake3`'s build-script `OPT_LEVEL` to `3` and Rust compiler flag to
`-Copt-level=3` so both the native backends and Rust implementation are optimized.

GitOrigin-RevId: ebf9b96255e68ba775443077ebf3fd897282795d
This commit is contained in:
jif
2026-09-25 20:10:09 +00:00
committed by copyberry
parent 782826663d
commit 888948e522
+4
View File
@@ -351,11 +351,15 @@ crate.from_cargo(
bazel_dep(name = "zstd", version = "1.5.7")
crate.annotation(
# Daemon tests repeatedly hash large CLI binaries, even in fastbuild mode.
# Optimize the native backends as well as the Rust implementation.
build_script_env = {"OPT_LEVEL": "3"},
# The Windows lint toolchain cannot reliably materialize blake3's native x86 assembly archives.
crate = "blake3",
crate_features_select = {
"x86_64-pc-windows-gnullvm": ["pure"],
},
rustc_flags = ["-Copt-level=3"],
)
crate.annotation(
crate = "zstd-sys",