about summary refs log tree commit diff
path: root/library/stdarch/crates/std_detect/src/detect
diff options
context:
space:
mode:
authorLuca Barbato <lu_zero@gentoo.org>2019-08-31 09:30:10 +0200
committergnzlbg <gnzlbg@users.noreply.github.com>2019-09-06 15:01:26 +0200
commit430744f46a9f1be5b6dd52c428340fb8e8b49218 (patch)
treed10acbf1a3f45f391be6262e1480d8a4d1890675 /library/stdarch/crates/std_detect/src/detect
parent5bfd08cd65c263e3863b06bd31213844793574fe (diff)
downloadrust-430744f46a9f1be5b6dd52c428340fb8e8b49218.tar.gz
rust-430744f46a9f1be5b6dd52c428340fb8e8b49218.zip
Minimal miri support
Should address https://github.com/rust-lang/miri/issues/932
Diffstat (limited to 'library/stdarch/crates/std_detect/src/detect')
-rw-r--r--library/stdarch/crates/std_detect/src/detect/mod.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/library/stdarch/crates/std_detect/src/detect/mod.rs b/library/stdarch/crates/std_detect/src/detect/mod.rs
index f446e88eedc..70a50820b36 100644
--- a/library/stdarch/crates/std_detect/src/detect/mod.rs
+++ b/library/stdarch/crates/std_detect/src/detect/mod.rs
@@ -64,7 +64,10 @@ mod bit;
 mod cache;
 
 cfg_if! {
-    if #[cfg(any(target_arch = "x86", target_arch = "x86_64"))] {
+    if #[cfg(miri)] {
+        #[path = "os/other.rs"]
+        mod os;
+    } else if #[cfg(any(target_arch = "x86", target_arch = "x86_64"))] {
         // On x86/x86_64 no OS specific functionality is required.
         #[path = "os/x86.rs"]
         mod os;