diff options
Diffstat (limited to 'library/stdarch/crates/std_detect')
| -rw-r--r-- | library/stdarch/crates/std_detect/src/detect/os/x86.rs | 5 | ||||
| -rw-r--r-- | library/stdarch/crates/std_detect/src/lib.rs | 4 |
2 files changed, 2 insertions, 7 deletions
diff --git a/library/stdarch/crates/std_detect/src/detect/os/x86.rs b/library/stdarch/crates/std_detect/src/detect/os/x86.rs index 027df571f82..f8811e8cf13 100644 --- a/library/stdarch/crates/std_detect/src/detect/os/x86.rs +++ b/library/stdarch/crates/std_detect/src/detect/os/x86.rs @@ -28,9 +28,8 @@ use crate::detect::{bit, cache, Feature}; pub(crate) fn detect_features() -> cache::Initializer { let mut value = cache::Initializer::default(); - // If the x86 CPU does not support the CPUID instruction then it is too - // old to support any of the currently-detectable features. - if !has_cpuid() { + if cfg!(target_env = "sgx") { + // doesn't support this because it is untrusted data return value; } diff --git a/library/stdarch/crates/std_detect/src/lib.rs b/library/stdarch/crates/std_detect/src/lib.rs index 846b17b01d5..881e12cf9c3 100644 --- a/library/stdarch/crates/std_detect/src/lib.rs +++ b/library/stdarch/crates/std_detect/src/lib.rs @@ -20,10 +20,6 @@ #![cfg_attr(test, allow(unused_imports))] #![no_std] #![allow(internal_features)] -#![cfg_attr( - any(target_arch = "x86", target_arch = "x86_64"), - feature(stdarch_x86_has_cpuid) -)] #[cfg(test)] #[macro_use] |
