Commit graph

18 commits

Author SHA1 Message Date
A. Cody Schuffelen
ecc0206af8 Upgrade rust to 1.73.0
There don't appear to be any new clippy warnings, and this is the
version of Rust that Android is now using: b/303252546. Work for the
next version is tracked in b/310977762.

This doesn't have any particular features I'm looking for (async traits
only come in 1.75.0). I'm not particularly attached to this change. If
it's easy to upgrade the container though, we could ensure no new clippy
warnings appear.

Android rust versions appear here:
https://cs.android.com/android/platform/superproject/main/+/main:prebuilts/rust/linux-x86/

Also not sure what the ChromeOS release schedule is.

Release docs: https://releases.rs/docs/1.73.0/

Test: tools/dev_container --clean bash -c "rustc --version && tools/presubmit clippy"
Change-Id: I2d3010c3032053709f0c0beb7dcbe2b80d782415
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5201659
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
2024-02-20 19:11:51 +00:00
Dennis Kempin
8656c2f8c3 Upgrade to 1.68.2: Set default version and rebuild container
The new toolchain is now used in CI and as default for developer builds.

The mingw ldd hack is no longer needed as debian has released a fixed
package.

BUG=None
TEST=CQ

Change-Id: I713d2901165ec33efe301e79819ef31ab86fee48
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4568145
Commit-Queue: Dennis Kempin <denniskempin@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
2023-05-25 18:30:55 +00:00
Dennis Kempin
0ef6a9a6c4 rust-toolchain: Add llvm-tools-preview
The llvm tools provide access to commonly used llvm tools through
cargo - specifically we need llvm-strip for stripping debug data
before packaging tests for remote execution.

This is already installed by install-deps. But having it part of the
toolchain file will automatically install it on toolchain updates
as well.

BUG=None
TEST=None

Change-Id: I433ebccb5d7a2c419c5cab7476146a142967e439
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4240537
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
2023-02-10 20:47:41 +00:00
Zihan Chen
28ce4e5423 crosvm: Uprev rust toolchain and dev container
- Rust toolchain is updated to 1.65.0
- Catapult dashboard upload tool is added to dev_container
- Bindgen is updated to latest version to support custom derive
- Derive Eq when PartialEq is derived as required by new Clippy

TEST=CQ, bindgen-all-the-things

FIXED=b:260784028
BUG=b:257303497

Change-Id: I2034cd09e0aed84d4e9b30f2e85d84d94a442ea4
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4228427
Auto-Submit: Zihan Chen <zihanchen@google.com>
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Commit-Queue: Zihan Chen <zihanchen@google.com>
2023-02-08 20:26:30 +00:00
Dennis Kempin
aae0141680 dev_container: Upgrade to debian bookworm
Debian bullseye is becoming old and we require a couple of newer
dependencies. gLinux is also tracking bookworm, so we are staying
close to our usual development environment.

Since the official rust images do not have a bookworm version,
we switch to the official debian image and add a rustup install
to ./tools/install-deps.

The new glibc version uses clone3 in multiple devices, adding
this new syscall to our policy to pass integration tests.

Drive-by change: Upgrading rust-toolchain from 1.62.0 to 1.62.1

BUG=b:243081643
TEST=CQ

Change-Id: I8af721ed4a83df61163d67001b777166abe8abfa
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3892621
Commit-Queue: Dennis Kempin <denniskempin@google.com>
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
2022-09-14 22:32:36 +00:00
Daniel Verkamp
4e36e8a601 rust-toolchain: update to Rust 1.62
This matches the recent ChromeOS SDK update.

BUG=b:243677117
TEST=tools/dev_container tools/clippy

Change-Id: I5de34abfe0985b5f41ac666ce3e93adbb628d790
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3854975
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: Daniel Verkamp <dverkamp@chromium.org>
2022-09-06 17:36:34 +00:00
Daniel Verkamp
d1a6e9cf94 rust-toolchain: update to 1.60.0
The ChromeOS toolchain is updated to this point, so bring our crosvm
testing in line.

BUG=b:239075544
TEST=tools/presubmit --all

Change-Id: I6bfa7bfd802f1cd75204ba59b560de176a56326f
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3764424
Tested-by: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
2022-07-28 17:46:00 +00:00
Anton Romanov
cb3cabe3ba Upgrade rust toolchain version to 1.58.1
Pre 1.58.1 have CVE-2022-21658
Cros toolchain got upgraded to 1.58.1

BUG=None
TEST=cq

Change-Id: I2ce5a08b40bcc4895c4f2ecef83efd4162d67494
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3435385
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Anton Romanov <romanton@google.com>
2022-02-04 02:20:36 +00:00
Dennis Kempin
0fcc7ace5a Uprev rust toolchain to 1.56.1
Two new clippy fixes are affecting us, but will be easy to fix in
a follow-up.
Fixed the dev-container so we can create a new version with the new
toolchain.

BUG=b:210037151
TEST=Kokoro

Change-Id: I9ac4d84aff72b1ee5219d6dab0a88667ca6c5951
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3328954
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
2021-12-10 02:34:50 +00:00
Dennis Kempin
65740a6842 Uprev to rust 1.55.0
Includes some fixes for new clippy checks. A rebuilt
dev_container that ships the new toolchain.

This allows us to get rid of the annoying cargo clean
before running clippy.

BUG=b:203142205
TEST=./tools/presubmit

Change-Id: I9d486fbcf7b2d468f6a1375ac7df95091a2c1465
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3232277
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
2021-10-19 19:12:52 +00:00
Dennis Kempin
191b95b5d7 native and aarch64 cross-compile containers
This CL adds the foundation for running tests consistently
in Kokoro and locally, for both x86 and aarch64.

The crosvm_builder is similar to the original image from
docker/crosvm.Dockerfile.
The main difference is that ChromeOS dependencies are not
compiled into the container, but built at runtime.

The crosvm_aarch64_builder installs the build enviornment
to cross-compile crosvm for aarch64. The tests are run
with user-space emulation using qemu-aarch64-static.

See ci/README.md for instructions on how to use these
builders.

Tests on aarch64 cannot all be run using user-space
emulation. We will need a VM to pass all smoke tests,
this work is tracked in b/177228167.

BUG=b:177133814
TEST=Tested by running
./ci/builder bin/smoke_test
./ci/builder cargo test
./ci/aarch64_builder cargo build
./ci/aarch64_builder cargo test -p tempfile

Change-Id: Iffffcf48894787dd72fff894af351fdaced0b429
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2621994
Reviewed-by: Zach Reizner <zachr@chromium.org>
Reviewed-by: Stephen Barber <smbarber@chromium.org>
Tested-by: Dennis Kempin <denniskempin@google.com>
Commit-Queue: Dennis Kempin <denniskempin@google.com>
2021-01-20 17:41:27 +00:00
Chirantan Ekbote
a7b75c8a21 rust-toolchain: Change to stable
We end up using newer features of the language pretty much as soon as
they hit stable so have a toolchain version that's older than the latest
stable will quickly break.

Also, cargo doesn't install any extra components for this named
toolchain (rls, rust-analysis) and it's not immediately obvious why
things stopped working.

Instead, change the toolchain file to say stable to avoid these issues.

BUG=none
TEST=none

Change-Id: I9c02b64a1bb0175a2c7fd70702328e4082819b91
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/1863894
Tested-by: Chirantan Ekbote <chirantan@chromium.org>
Auto-Submit: Chirantan Ekbote <chirantan@chromium.org>
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Chirantan Ekbote <chirantan@chromium.org>
2019-10-16 22:12:41 +00:00
Daniel Verkamp
a08e40bf81 rust-toolchain: upgrade to Rust 1.36.0
Update the rust-toolchain file and Docker image used in kokoro to match
the Chrome OS toolchain.

BUG=None
TEST=docker/wrapped_smoke_test.sh

Change-Id: I95cbf9bcaadd49b8476f2829bc75958dbea304e3
Signed-off-by: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/1724850
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Zach Reizner <zachr@chromium.org>
2019-07-30 05:35:31 +00:00
Daniel Verkamp
99c65d41f8 rust-toolchain: upgrade to Rust 1.35.0
BUG=None
TEST=docker/wrapped_smoke_test.sh

Change-Id: I0a159d9b54d97098d633ce80b92eeb48eb5c4b55
Signed-off-by: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/1632036
Reviewed-by: Zach Reizner <zachr@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
2019-05-30 01:11:13 +00:00
Daniel Verkamp
939997566d rust-toolchain: upgrade to Rust 1.33.0
BUG=None
TEST=build_test
CQ-DEPEND=CL:1534743

Change-Id: Ic2d9a89dd65b995510b97221e34653442be10cfa
Signed-off-by: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1534964
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: David Tolnay <dtolnay@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: David Tolnay <dtolnay@chromium.org>
2019-04-08 22:30:30 -07:00
Daniel Verkamp
d82f27abd7 rust-toolchain: update to Rust 1.32.0
The Chrome OS Rust toolchain has been updated to Rust 1.32.0[1]; update
the version in Kokoro and the rust-toolchain file to match.

It looks like there is also one minor formatting change (again).

BUG=None
TEST=Build kokoro image and run tests

[1]: https://chromium-review.googlesource.com/1432733

Change-Id: I5669d99463618e19cb5e957171560dbea33bd5b8
Signed-off-by: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1470913
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Zach Reizner <zachr@chromium.org>
2019-02-19 22:15:20 -08:00
David Tolnay
2bac1e7a9c toolchain: Update to Rust 1.31.0
We updated the production toolchain from 1.30 to 1.31 in CL:1366446.
This CL does the same upgrade for the local developer toolchain and
Kokoro.

The relevant changes are in rust-toolchain and kokoro/Dockerfile.
The rest are from rustfmt.

TEST=cargo fmt --all -- --check
TEST=as described in kokoro/README.md

Change-Id: I3b4913f3e237baa36c664b4953be360c09efffd4
Reviewed-on: https://chromium-review.googlesource.com/1374376
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: David Tolnay <dtolnay@chromium.org>
Reviewed-by: Zach Reizner <zachr@chromium.org>
2018-12-13 19:28:04 -08:00
David Tolnay
298cf591ac toolchain: Add rust-toolchain file
The rust-toolchain file defines a local toolchain override that is
respected by rustup when running Cargo commands. This override applies
to the directory containing the rust-toolchain file as well as its
subdirectories. It makes it so that running `cargo check` or `cargo fmt`
always uses the intended toolchain, unless overridden by e.g. `cargo
+nightly check`, regardless of what toolchain the user has selected as
global default. No more accidentally running a too new or old version of
rustfmt!

We will need to bump this version number when rolling to a newer
toolchain in ebuild. When that happens, local Cargo commands by other
crosvm developers will automatically download the new toolchain.

For details on rust-toolchain:

    https://github.com/rust-lang-nursery/rustup.rs#the-toolchain-file
    https://github.com/rust-lang-nursery/rustup.rs#override-precedence

This file is ignored during emerge. Verified by setting rust-toolchain
to a bogus version number and emerge succeeded anyway.

TEST=rustc --version
TEST=rustc +nightly --version
TEST=cargo check
TEST=cargo fmt --all
TEST=cargo +nightly check
TEST=build_packages

Change-Id: Ia4d74a0c8c632bcd7b171f6c039b068fb30b5502
Reviewed-on: https://chromium-review.googlesource.com/1340728
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: David Tolnay <dtolnay@chromium.org>
Reviewed-by: Zach Reizner <zachr@chromium.org>
2018-11-20 05:52:35 -08:00