summaryrefslogtreecommitdiffstats
path: root/third_party/rust/ahash/build.rs
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/rust/ahash/build.rs')
-rw-r--r--third_party/rust/ahash/build.rs31
1 files changed, 2 insertions, 29 deletions
diff --git a/third_party/rust/ahash/build.rs b/third_party/rust/ahash/build.rs
index 6aba02526b..a136b3666c 100644
--- a/third_party/rust/ahash/build.rs
+++ b/third_party/rust/ahash/build.rs
@@ -4,34 +4,8 @@ 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\"");
- 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");
- 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("specialize") {
+ println!("cargo:rustc-cfg=feature=\"specialize\"");
}
let arch = env::var("CARGO_CFG_TARGET_ARCH").expect("CARGO_CFG_TARGET_ARCH was not set");
if arch.eq_ignore_ascii_case("x86_64")
@@ -43,5 +17,4 @@ fn main() {
{
println!("cargo:rustc-cfg=feature=\"folded_multiply\"");
}
-
}