From 3936dde5060662418cf756546a19e6b07fcf1ffd Mon Sep 17 00:00:00 2001 From: Antonius Naumann Date: Sun, 4 Aug 2024 16:55:27 +0200 Subject: [PATCH] Skip toolchain check for tier 3 targets --- src/commands/package.rs | 1 + src/targets.rs | 6 +----- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/commands/package.rs b/src/commands/package.rs index 16da45c..799ea96 100644 --- a/src/commands/package.rs +++ b/src/commands/package.rs @@ -294,6 +294,7 @@ fn check_installed_toolchains(targets: &[Target]) -> Vec<&'static str> { targets .iter() + .filter(|t| !t.platform().is_tier_3()) .flat_map(|t| t.architectures()) .filter(|arch| { !installed diff --git a/src/targets.rs b/src/targets.rs index 9ccf287..be11097 100644 --- a/src/targets.rs +++ b/src/targets.rs @@ -51,7 +51,7 @@ impl Target { .into_iter() .map(|arch| { // FIXME: Remove nightly for Tier 3 targets here once build-std is stabilized - let mut cmd = if self.is_tier_3() { command("cargo +nightly build -Z build-std") } else { command("cargo build") }; + let mut cmd = if self.platform().is_tier_3() { command("cargo +nightly build -Z build-std") } else { command("cargo build") }; cmd.arg("--target").arg(arch); match mode { @@ -179,10 +179,6 @@ impl Target { library_file_name(lib_name, lib_type) ) } - - fn is_tier_3(&self) -> bool { - self.platform().is_tier_3() - } } pub fn library_file_name(lib_name: &str, lib_type: LibType) -> String {