From fd973c2765a0de864e3b83bf6cd2af6dc3db025d Mon Sep 17 00:00:00 2001 From: Amanieu d'Antras Date: Thu, 4 Jan 2024 11:25:38 +0000 Subject: Fix std build failure on non-x86 architectures This is more fallout from #1486 --- library/stdarch/crates/std_detect/src/lib.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'library/stdarch/crates/std_detect/src/lib.rs') diff --git a/library/stdarch/crates/std_detect/src/lib.rs b/library/stdarch/crates/std_detect/src/lib.rs index f13dca7cc68..40c1aa4667d 100644 --- a/library/stdarch/crates/std_detect/src/lib.rs +++ b/library/stdarch/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] -- cgit 1.4.1-3-g733a5