Skip to content

Commit

Permalink
Link against libc++ on Apple targets
Browse files Browse the repository at this point in the history
  • Loading branch information
gferon committed Oct 23, 2023
1 parent 1180cda commit c5f3d48
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion rust_icu_sys/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<i8> for UCharCategory {
Expand Down

0 comments on commit c5f3d48

Please sign in to comment.