diff options
author | Daniel Verkamp <dverkamp@chromium.org> | 2020-04-15 11:41:50 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-04-18 12:01:32 +0000 |
commit | 043aaea79be76508cc52f07e54da6b933b1987ef (patch) | |
tree | 7862b8f1389598dc380244c7827710878c7eba49 /bin | |
parent | fcf078c38ad0bfdff17370108833833944b9c14c (diff) | |
download | crosvm-043aaea79be76508cc52f07e54da6b933b1987ef.tar crosvm-043aaea79be76508cc52f07e54da6b933b1987ef.tar.gz crosvm-043aaea79be76508cc52f07e54da6b933b1987ef.tar.bz2 crosvm-043aaea79be76508cc52f07e54da6b933b1987ef.tar.lz crosvm-043aaea79be76508cc52f07e54da6b933b1987ef.tar.xz crosvm-043aaea79be76508cc52f07e54da6b933b1987ef.tar.zst crosvm-043aaea79be76508cc52f07e54da6b933b1987ef.zip |
docker: update to rust 1.42 and rustup 1.21.1
Update to the latest rustup release, which (since 1.20.0) installs rustfmt and clippy by default: https://blog.rust-lang.org/2019/10/15/Rustup-1.20.0.html Also update the Rust toolchain version to 1.42.0 to match the version in the CrOS build environment. Additionally, add workarounds for sysroot of cargo clippy. BUG=None TEST=docker/build_crosvm_base.sh && docker/wrapped_smoke_test.sh TEST=bin/clippy on workstation Change-Id: I7ac4db92f4e5f277d77a77fa3c4ffa880f2ae116 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2150988 Tested-by: Keiichi Watanabe <keiichiw@chromium.org> Tested-by: Daniel Verkamp <dverkamp@chromium.org> Reviewed-by: Zach Reizner <zachr@chromium.org> Commit-Queue: Keiichi Watanabe <keiichiw@chromium.org>
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/clippy | 6 | ||||
-rwxr-xr-x | bin/smoke_test | 3 |
2 files changed, 8 insertions, 1 deletions
diff --git a/bin/clippy b/bin/clippy index 6631f26..03f85c8 100755 --- a/bin/clippy +++ b/bin/clippy @@ -72,5 +72,11 @@ SUPPRESS=( # Needed or else clippy won't re-run on code that has already compiled. cargo clean +# Need to set pass --sysroot for cargo-clippy manually. +# cf. https://github.com/rust-lang/rust-clippy/issues/3523 +RUST_SYSROOT=$(rustc --print sysroot) +RUSTFLAGS="${RUSTFLAGS:-}" +export RUSTFLAGS="$RUSTFLAGS --sysroot=$RUST_SYSROOT" + cargo clippy --all-features --all-targets -- ${SUPPRESS[@]/#/-Aclippy::} "$@" \ -D warnings diff --git a/bin/smoke_test b/bin/smoke_test index ade2a19..7467c75 100755 --- a/bin/smoke_test +++ b/bin/smoke_test @@ -10,7 +10,8 @@ cd ../ rustup default "$(cat rust-toolchain)" rustup component add rustfmt-preview -cargo --version && rustc --version && rustfmt --version +cargo --version && rustc --version && rustfmt --version \ + && cargo clippy --version echo "Running cargo test" cargo test --no-fail-fast --features plugin,default-no-sandbox,wl-dmabuf,gpu,tpm \ --all --exclude aarch64 $TEST_FLAGS -- \ |