Skip to content

Commit

Permalink
Trying to fix stdlib issue in tokenizers.
Browse files Browse the repository at this point in the history
  • Loading branch information
Narsil committed Oct 5, 2023
1 parent cc90d0e commit 51fe5a9
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "esaxx-rs"
version = "0.1.9"
version = "0.1.10"
authors = ["Nicolas Patry <patry.nicolas@protonmail.com>"]
edition = "2018"
description = "Wrapping around sentencepiece's esaxxx library."
Expand Down
14 changes: 14 additions & 0 deletions build.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#[cfg(feature = "cpp")]
#[cfg(not(target_os = "macos"))]
fn main() {
cc::Build::new()
.cpp(true)
Expand All @@ -9,5 +10,18 @@ fn main() {
.compile("esaxx");
}

#[cfg(feature = "cpp")]
#[cfg(target_os = "macos")]
fn main() {
cc::Build::new()
.cpp(true)
.flag("-std=c++11")
.flag("-stdlib=libc++")
.static_crt(true)
.file("src/esaxx.cpp")
.include("src")
.compile("esaxx");
}

#[cfg(not(feature = "cpp"))]
fn main() {}

0 comments on commit 51fe5a9

Please sign in to comment.