]> git.proxmox.com Git - cargo.git/blobdiff - vendor/crossbeam-utils/build.rs
New upstream version 0.52.0
[cargo.git] / vendor / crossbeam-utils / build.rs
index 2f5012ad763a3879de94b0ffd7d0a9aa277b770d..3e51021835a074e26d6c58b9a58080f8829fa312 100644 (file)
@@ -1,10 +1,19 @@
-extern crate autocfg;
+use autocfg::AutoCfg;
 
+// The rustc-cfg strings below are *not* public API. Please let us know by
+// opening a GitHub issue if your build environment requires some way to enable
+// these cfgs other than by executing our build script.
 fn main() {
-    let cfg = autocfg::new();
-    if cfg.probe_rustc_version(1, 31) {
-        autocfg::emit("has_min_const_fn");
-    }
+    let cfg = match AutoCfg::new() {
+        Ok(cfg) => cfg,
+        Err(e) => {
+            println!(
+                "cargo:warning=crossbeam-utils: unable to determine rustc version: {}",
+                e
+            );
+            return;
+        }
+    };
 
     cfg.emit_type_cfg("core::sync::atomic::AtomicU8", "has_atomic_u8");
     cfg.emit_type_cfg("core::sync::atomic::AtomicU16", "has_atomic_u16");