aboutsummaryrefslogtreecommitdiff
path: root/src/platform.rs
diff options
context:
space:
mode:
authorJack O'Connor <[email protected]>2020-02-10 15:24:10 -0500
committerJack O'Connor <[email protected]>2020-02-10 15:25:23 -0500
commitaf2e791602ca59a5258b6d0f8f49845213a916a2 (patch)
tree377570910d005ae26857d63fef9ebacef41b3344 /src/platform.rs
parentc0a43e5fb88141536199e43905f10d04874653aa (diff)
avoid compiling avx512_detected() when the "c_avx512" feature is disabled
https://github.com/rust-lang/rust/issues/68905 is currently causing nightly builds to fail, unless `--no-default-features` is used. This change means that the default build will succeed, and the failure will only happen when the "c_avx512" is enabled. The `b3sum` crate will still fail to build on nightly, because it enables that feature, but most callers should start succeeding on nightly.
Diffstat (limited to 'src/platform.rs')
-rw-r--r--src/platform.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/platform.rs b/src/platform.rs
index abf9d30..b453a6e 100644
--- a/src/platform.rs
+++ b/src/platform.rs
@@ -252,6 +252,7 @@ impl Platform {
// Note that AVX-512 is divided into multiple featuresets, and we use two of
// them, F and VL.
+#[cfg(feature = "c_avx512")]
#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
#[inline(always)]
pub fn avx512_detected() -> bool {