ci/build-rust: strip rust libs and binaries

Stripping the libs saves 39 MiB and stripping the binaries saves 29 MiB
per toolchain installed.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37414>
This commit is contained in:
Eric Engestrom
2025-09-16 18:35:36 +02:00
committed by Marge Bot
parent be825ee11f
commit 28e4d1961e

View File

@@ -42,6 +42,9 @@ then
rustup toolchain install --profile minimal --component clippy,rustfmt $MINIMUM_SUPPORTED_RUST_VERSION
fi
find "$HOME"/.rustup/toolchains/*/lib -type f -name "*.so" -exec strip {} \;
find "$HOME"/.rustup/toolchains -type f -executable -exec strip {} \;
# Set up a config script for cross compiling -- cargo needs your system cc for
# linking in cross builds, but doesn't know what you want to use for system cc.
cat > "$HOME/.cargo/config" <<EOF