Skip to content

Commit 51fe5a9

Browse files
committed
Trying to fix stdlib issue in tokenizers.
1 parent cc90d0e commit 51fe5a9

File tree

3 files changed

+16
-2
lines changed

3 files changed

+16
-2
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "esaxx-rs"
3-
version = "0.1.9"
3+
version = "0.1.10"
44
authors = ["Nicolas Patry <patry.nicolas@protonmail.com>"]
55
edition = "2018"
66
description = "Wrapping around sentencepiece's esaxxx library."

build.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#[cfg(feature = "cpp")]
2+
#[cfg(not(target_os = "macos"))]
23
fn main() {
34
cc::Build::new()
45
.cpp(true)
@@ -9,5 +10,18 @@ fn main() {
910
.compile("esaxx");
1011
}
1112

13+
#[cfg(feature = "cpp")]
14+
#[cfg(target_os = "macos")]
15+
fn main() {
16+
cc::Build::new()
17+
.cpp(true)
18+
.flag("-std=c++11")
19+
.flag("-stdlib=libc++")
20+
.static_crt(true)
21+
.file("src/esaxx.cpp")
22+
.include("src")
23+
.compile("esaxx");
24+
}
25+
1226
#[cfg(not(feature = "cpp"))]
1327
fn main() {}

0 commit comments

Comments
 (0)