diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 84f0d76b988..e344f1c1fa6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -228,6 +228,7 @@ jobs: - powerpc64-unknown-linux-gnu - mips-unknown-linux-gnu - arm-linux-androideabi + - mipsel-unknown-linux-musl steps: - uses: actions/checkout@v2 - name: Install Rust ${{ env.rust_stable }} @@ -241,7 +242,14 @@ jobs: with: use-cross: true command: check - args: --workspace --target ${{ matrix.target }} + args: --workspace --all-features --target ${{ matrix.target }} + - uses: actions-rs/cargo@v1 + with: + use-cross: true + command: check + args: --workspace --all-features --target ${{ matrix.target }} + env: + RUSTFLAGS: --cfg tokio_unstable -Dwarnings features: name: features diff --git a/Cross.toml b/Cross.toml new file mode 100644 index 00000000000..050f2bdbd75 --- /dev/null +++ b/Cross.toml @@ -0,0 +1,4 @@ +[build.env] +passthrough = [ + "RUSTFLAGS", +] diff --git a/tokio/src/loom/std/atomic_u64.rs b/tokio/src/loom/std/atomic_u64.rs index 113992d9775..ac20f352943 100644 --- a/tokio/src/loom/std/atomic_u64.rs +++ b/tokio/src/loom/std/atomic_u64.rs @@ -75,4 +75,12 @@ cfg_not_has_atomic_u64! { self.compare_exchange(current, new, success, failure) } } + + impl Default for AtomicU64 { + fn default() -> AtomicU64 { + Self { + inner: Mutex::new(0), + } + } + } } diff --git a/tokio/src/runtime/metrics/io.rs b/tokio/src/runtime/metrics/io.rs index 4928c48e8d8..9706bfc9bc2 100644 --- a/tokio/src/runtime/metrics/io.rs +++ b/tokio/src/runtime/metrics/io.rs @@ -1,6 +1,6 @@ #![cfg_attr(not(feature = "net"), allow(dead_code))] -use std::sync::atomic::{AtomicU64, Ordering::Relaxed}; +use crate::loom::sync::atomic::{AtomicU64, Ordering::Relaxed}; #[derive(Default)] pub(crate) struct IoDriverMetrics {