about summary refs log tree commit diff
path: root/library/stdarch/crates/std_detect
diff options
context:
space:
mode:
authorAmanieu d'Antras <amanieu@gmail.com>2024-01-04 11:25:38 +0000
committerAmanieu d'Antras <amanieu@gmail.com>2024-01-04 13:00:34 +0000
commitfd973c2765a0de864e3b83bf6cd2af6dc3db025d (patch)
tree1ccafd655af2a7fcc33258a0b92a2388af974a59 /library/stdarch/crates/std_detect
parenta600c72f50a91d33e4f0708b0c414948fdf83f65 (diff)
downloadrust-fd973c2765a0de864e3b83bf6cd2af6dc3db025d.tar.gz
rust-fd973c2765a0de864e3b83bf6cd2af6dc3db025d.zip
Fix std build failure on non-x86 architectures
This is more fallout from #1486
Diffstat (limited to 'library/stdarch/crates/std_detect')
-rw-r--r--library/stdarch/crates/std_detect/src/lib.rs8
1 files changed, 7 insertions, 1 deletions
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]