Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,11 @@ jobs:
- os: ubuntu-22.04
target: aarch64-unknown-linux-musl
container: '{"image": "messense/rust-musl-cross:aarch64-musl"}'
- os: ubuntu-22.04
binary: sccache-dist
extra_args: --no-default-features --features="dist-server"
target: aarch64-unknown-linux-musl
container: '{"image": "messense/rust-musl-cross:aarch64-musl"}'
- os: ubuntu-22.04
target: armv7-unknown-linux-musleabi
container: '{"image": "messense/rust-musl-cross:armv7-musleabi"}'
Expand Down
2 changes: 2 additions & 0 deletions src/bin/sccache-dist/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ pub const INSECURE_DIST_SERVER_TOKEN: &str = "dangerously_insecure_server";

#[cfg(not(any(
all(target_os = "linux", target_arch = "x86_64"),
all(target_os = "linux", target_arch = "aarch64"),
target_os = "freebsd"
)))]
fn main() {
Expand All @@ -46,6 +47,7 @@ fn main() {
// Only supported on x86_64 Linux machines and on FreeBSD
#[cfg(any(
all(target_os = "linux", target_arch = "x86_64"),
all(target_os = "linux", target_arch = "aarch64"),
target_os = "freebsd"
))]
fn main() {
Expand Down
5 changes: 4 additions & 1 deletion src/compiler/c.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1331,7 +1331,10 @@ struct CToolchainPackager {
}

#[cfg(feature = "dist-client")]
#[cfg(all(target_os = "linux", target_arch = "x86_64"))]
#[cfg(all(
target_os = "linux",
any(target_arch = "x86_64", target_arch = "aarch64")
))]
impl pkg::ToolchainPackager for CToolchainPackager {
fn write_pkg(self: Box<Self>, f: fs::File) -> Result<()> {
use std::os::unix::ffi::OsStringExt;
Expand Down
2 changes: 2 additions & 0 deletions src/compiler/compiler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ use crate::errors::*;
feature = "dist-client",
any(
all(target_os = "linux", target_arch = "x86_64"),
all(target_os = "linux", target_arch = "aarch64"),
target_os = "freebsd"
)
))]
Expand All @@ -71,6 +72,7 @@ pub const CAN_DIST_DYLIBS: bool = true;
feature = "dist-client",
not(any(
all(target_os = "linux", target_arch = "x86_64"),
all(target_os = "linux", target_arch = "aarch64"),
target_os = "freebsd"
))
))]
Expand Down
5 changes: 4 additions & 1 deletion src/compiler/rust.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2212,7 +2212,10 @@ struct RustToolchainPackager {
}

#[cfg(feature = "dist-client")]
#[cfg(all(target_os = "linux", target_arch = "x86_64"))]
#[cfg(all(
target_os = "linux",
any(target_arch = "x86_64", target_arch = "aarch64")
))]
impl pkg::ToolchainPackager for RustToolchainPackager {
fn write_pkg(self: Box<Self>, f: fs::File) -> Result<()> {
info!(
Expand Down
15 changes: 12 additions & 3 deletions src/dist/pkg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ use std::str;

use crate::errors::*;

#[cfg(all(target_os = "linux", target_arch = "x86_64"))]
#[cfg(all(
target_os = "linux",
any(target_arch = "x86_64", target_arch = "aarch64")
))]
pub use self::toolchain_imp::*;

pub trait ToolchainPackager: Send {
Expand All @@ -36,7 +39,10 @@ pub trait OutputsRepackager {
-> Result<dist::PathTransformer>;
}

#[cfg(not(all(target_os = "linux", target_arch = "x86_64")))]
#[cfg(not(all(
target_os = "linux",
any(target_arch = "x86_64", target_arch = "aarch64")
)))]
mod toolchain_imp {
use super::ToolchainPackager;
use fs_err as fs;
Expand All @@ -52,7 +58,10 @@ mod toolchain_imp {
}
}

#[cfg(all(target_os = "linux", target_arch = "x86_64"))]
#[cfg(all(
target_os = "linux",
any(target_arch = "x86_64", target_arch = "aarch64")
))]
mod toolchain_imp {
use super::SimplifyPath;
use fs_err as fs;
Expand Down