From 218caa410aa38c29984be31a5229b9fa717560ee Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:19:13 +0200 Subject: Merging upstream version 1.68.2+dfsg1. Signed-off-by: Daniel Baumann --- vendor/ahash/build.rs | 30 ++++-------------------------- 1 file changed, 4 insertions(+), 26 deletions(-) (limited to 'vendor/ahash/build.rs') diff --git a/vendor/ahash/build.rs b/vendor/ahash/build.rs index 8be4964e5..0c5b76929 100644 --- a/vendor/ahash/build.rs +++ b/vendor/ahash/build.rs @@ -4,32 +4,11 @@ use std::env; fn main() { println!("cargo:rerun-if-changed=build.rs"); - 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 let Some(true) = version_check::supports_feature("specialize") { + println!("cargo:rustc-cfg=feature=\"specialize\""); } - let os = env::var("CARGO_CFG_TARGET_OS").expect("CARGO_CFG_TARGET_OS was not set"); - if os.eq_ignore_ascii_case("linux") - || os.eq_ignore_ascii_case("android") - || os.eq_ignore_ascii_case("windows") - || os.eq_ignore_ascii_case("macos") - || os.eq_ignore_ascii_case("ios") - || os.eq_ignore_ascii_case("freebsd") - || os.eq_ignore_ascii_case("openbsd") - || os.eq_ignore_ascii_case("dragonfly") - || os.eq_ignore_ascii_case("solaris") - || os.eq_ignore_ascii_case("illumos") - || os.eq_ignore_ascii_case("fuchsia") - || os.eq_ignore_ascii_case("redox") - || os.eq_ignore_ascii_case("cloudabi") - || os.eq_ignore_ascii_case("haiku") - || os.eq_ignore_ascii_case("vxworks") - || os.eq_ignore_ascii_case("emscripten") - || os.eq_ignore_ascii_case("wasi") - { - println!("cargo:rustc-cfg=feature=\"runtime-rng\""); + if let Some(true) = version_check::supports_feature("stdsimd") { + println!("cargo:rustc-cfg=feature=\"stdsimd\""); } let arch = env::var("CARGO_CFG_TARGET_ARCH").expect("CARGO_CFG_TARGET_ARCH was not set"); if arch.eq_ignore_ascii_case("x86_64") @@ -41,5 +20,4 @@ fn main() { { println!("cargo:rustc-cfg=feature=\"folded_multiply\""); } - } -- cgit v1.2.3