From 67ebac869fca7c44a17e7de55706e627715efe97 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Sun, 3 Oct 2021 09:40:20 -0700 Subject: [PATCH] Make the spin dependency optional. Make the spin dependency optional so that users enabling libc, which enables libc-based locking, don't need to depend on spin. --- Cargo.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index c18ce62..038cf5c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,7 +10,7 @@ members = ["cdylib", "example"] [dependencies] gimli = { version = "0.25.0", default-features = false, features = ["read"] } libc = { version = "0.2", optional = true } -spin = { version = "0.9", default-features = false, features = ["mutex", "spin_mutex"] } +spin = { version = "0.9", optional = true, default-features = false, features = ["mutex", "spin_mutex"] } [patch.crates-io] gimli = { git = "https://github.com/gimli-rs/gimli.git" } @@ -31,7 +31,7 @@ panic = ["alloc"] panic-handler = ["print", "panic"] panic-handler-dummy = [] system-alloc = [] -default = ["unwinder", "dwarf-expr", "hide-trace", "fde-phdr", "fde-registry"] +default = ["unwinder", "dwarf-expr", "hide-trace", "fde-phdr", "fde-registry", "spin"] [profile.dev] # Must be turned on due to Rust bug https://github.com/rust-lang/rust/issues/50007