From 5b11935d4331f9a908f00359cc3e96e99e055be1 Mon Sep 17 00:00:00 2001 From: Luca Barbato Date: Sat, 31 Aug 2019 14:55:21 +0200 Subject: [PATCH] Document how miri support works Co-Authored-By: gnzlbg --- library/stdarch/crates/std_detect/src/detect/mod.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/library/stdarch/crates/std_detect/src/detect/mod.rs b/library/stdarch/crates/std_detect/src/detect/mod.rs index 70a50820b363..80207daad8f3 100644 --- a/library/stdarch/crates/std_detect/src/detect/mod.rs +++ b/library/stdarch/crates/std_detect/src/detect/mod.rs @@ -65,6 +65,11 @@ mod cache; cfg_if! { if #[cfg(miri)] { + // When running under miri all target-features that are not enabled at + // compile-time are reported as disabled at run-time. + // + // For features for which `cfg(target_feature)` returns true, + // this run-time detection logic is never called. #[path = "os/other.rs"] mod os; } else if #[cfg(any(target_arch = "x86", target_arch = "x86_64"))] {