diff --git a/Cargo.toml b/Cargo.toml index bd87aacf0b..31c386bc26 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,4 +1,5 @@ [workspace] +resolver = "2" members = [ "bindgen", "bindgen-cli", @@ -7,7 +8,6 @@ members = [ "bindgen-tests/tests/quickchecking", "bindgen-tests/tests/expectations", ] - default-members = [ "bindgen", "bindgen-cli", @@ -54,4 +54,3 @@ release = false [profile.dist] inherits = "release" lto = "thin" - diff --git a/bindgen/lib.rs b/bindgen/lib.rs index b9b4888aa8..18b5023b1f 100644 --- a/bindgen/lib.rs +++ b/bindgen/lib.rs @@ -74,7 +74,6 @@ use std::path::{Path, PathBuf}; use std::process::{Command, Stdio}; use std::rc::Rc; use std::str::FromStr; -use std::sync::{Arc, OnceLock}; // Some convenient typedefs for a fast hash map and hash set. type HashMap = rustc_hash::FxHashMap; @@ -576,6 +575,8 @@ impl BindgenOptions { #[cfg(feature = "runtime")] fn ensure_libclang_is_loaded() { + use std::sync::{Arc, OnceLock}; + if clang_sys::is_loaded() { return; }