From 10b0fcd88f53fee38d3d7c19a6a58cccb070d134 Mon Sep 17 00:00:00 2001 From: Amanieu d'Antras Date: Thu, 4 Jan 2024 11:25:38 +0000 Subject: [PATCH] Fix std build failure on non-x86 architectures This is more fallout from #1486 --- crates/std_detect/src/lib.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/crates/std_detect/src/lib.rs b/crates/std_detect/src/lib.rs index f13dca7cc6..40c1aa4667 100644 --- a/crates/std_detect/src/lib.rs +++ b/crates/std_detect/src/lib.rs @@ -24,7 +24,13 @@ // Remove this as soon as the stdarch submodule is updated on nightly. #![allow(stable_features)] #![feature(stdsimd)] -#![cfg_attr(feature = "rustc-dep-of-std", feature(stdarch_x86_has_cpuid))] +#![cfg_attr( + all( + any(target_arch = "x86", target_arch = "x86_64"), + feature = "rustc-dep-of-std" + ), + feature(stdarch_x86_has_cpuid) +)] #[cfg(test)] #[macro_use]