From c86d541dfee21e0821251f4852e60a32b1c58931 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Kr=C3=B6ning?= Date: Thu, 12 Dec 2024 12:16:57 +0100 Subject: [PATCH] fix(xtask): don't test `feature = "shell"` on unsupported arches --- xtask/src/clippy.rs | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/xtask/src/clippy.rs b/xtask/src/clippy.rs index b13bb208c6..b5957a2720 100644 --- a/xtask/src/clippy.rs +++ b/xtask/src/clippy.rs @@ -18,7 +18,7 @@ impl Clippy { let triple = arch.triple(); cmd!(sh, "cargo clippy --target={triple}").run()?; cmd!(sh, "cargo clippy --target={triple}") - .arg("--features=acpi,dns,fsgsbase,pci,shell,smp,vga") + .arg("--features=acpi,dns,fsgsbase,pci,smp,vga") .run()?; cmd!(sh, "cargo clippy --target={triple}") .arg("--no-default-features") @@ -29,19 +29,27 @@ impl Clippy { .run()?; cmd!(sh, "cargo clippy --target={triple}") .arg("--no-default-features") - .arg("--features=acpi,fsgsbase,pci,shell,smp,vga") + .arg("--features=acpi,fsgsbase,pci,smp,vga") .run()?; - if *arch == Arch::Riscv64 { - cmd!(sh, "cargo clippy --target={triple}") - .arg("--no-default-features") - .arg("--features=gem-net,tcp") - .run()?; + match *arch { + Arch::X86_64 => { + cmd!(sh, "cargo clippy --target={triple}") + .arg("--features=shell") + .run()?; + } + Arch::Aarch64 => {} + Arch::Riscv64 => { + cmd!(sh, "cargo clippy --target={triple}") + .arg("--no-default-features") + .arg("--features=gem-net,tcp") + .run()?; + } } cmd!(sh, "cargo clippy --target={triple}") .arg("--no-default-features") - .arg("--features=acpi,fsgsbase,newlib,shell,smp,vga") + .arg("--features=acpi,fsgsbase,newlib,smp,vga") .run()?; }