Add `--locked` to installation of `cargo fuzz` (#12178)

Helps pin dependencies at the time of when `cargo-fuzz` itself was
published to avoid dependency updates breaking builds. This fixes a
current issue where all Rust projects using `cargo fuzz` are broken due
to the installation of `cargo-fuzz` failing due to failing to build a
newer dependency with an older nightly.

Closes #12168
This commit is contained in:
Alex Crichton 2024-07-10 21:43:46 -05:00 committed by GitHub
parent 791e7d2f05
commit 150b4239c5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -16,7 +16,7 @@
################################################################################ ################################################################################
curl https://sh.rustup.rs | sh -s -- -y --default-toolchain=$RUSTUP_TOOLCHAIN --profile=minimal curl https://sh.rustup.rs | sh -s -- -y --default-toolchain=$RUSTUP_TOOLCHAIN --profile=minimal
cargo install cargo-fuzz && rm -rf /rust/registry cargo install cargo-fuzz --locked && rm -rf /rust/registry
# Needed to recompile rust std library for MSAN # Needed to recompile rust std library for MSAN
rustup component add rust-src rustup component add rust-src
cp -r /usr/local/lib/x86_64-unknown-linux-gnu/* /usr/local/lib/ cp -r /usr/local/lib/x86_64-unknown-linux-gnu/* /usr/local/lib/