Skip to content

Commit

Permalink
avoid compiling avx512_detected() when the "c_avx512" feature is disa…
Browse files Browse the repository at this point in the history
…bled

rust-lang/rust#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.
  • Loading branch information
oconnor663 committed Feb 10, 2020
1 parent c0a43e5 commit af2e791
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/platform.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit af2e791

Please sign in to comment.