From 9c2d4975238f3408c569d9960c85b521f9f3b172 Mon Sep 17 00:00:00 2001 From: Kornel Date: Tue, 6 Feb 2024 12:49:32 +0000 Subject: [PATCH] Disable nightly stdsimd on too-new rustc --- build.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/build.rs b/build.rs index 8be4964..6aba025 100644 --- a/build.rs +++ b/build.rs @@ -7,7 +7,9 @@ fn main() { if let Some(channel) = version_check::Channel::read() { if channel.supports_features() { println!("cargo:rustc-cfg=feature=\"specialize\""); - println!("cargo:rustc-cfg=feature=\"stdsimd\""); + if version_check::Version::read().map_or(false, |v| v.at_most("1.77.9")) { + println!("cargo:rustc-cfg=feature=\"stdsimd\""); + } } } let os = env::var("CARGO_CFG_TARGET_OS").expect("CARGO_CFG_TARGET_OS was not set");