diff --git a/rust_icu_sys/src/lib.rs b/rust_icu_sys/src/lib.rs index 229bde81..d4c64fc2 100644 --- a/rust_icu_sys/src/lib.rs +++ b/rust_icu_sys/src/lib.rs @@ -87,7 +87,15 @@ extern crate libc; #[cfg_attr(feature = "static", link(name = "icui18n", kind = "static"))] #[cfg_attr(feature = "static", link(name = "icuuc", kind = "static"))] #[cfg_attr(feature = "static", link(name = "icudata", kind = "static"))] -#[cfg_attr(feature = "static", link(name = "stdc++", kind = "dylib"))] +// On systems such as macOS, libc++ is the default library +#[cfg_attr( + all(target_vendor = "apple", feature = "static"), + link(name = "c++", kind = "dylib") +)] +#[cfg_attr( + not(all(target_vendor = "apple", feature = "static")), + link(name = "stdc++", kind = "dylib") +)] extern "C" {} impl From for UCharCategory {