Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions barretenberg/rust/barretenberg-rs/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,9 @@ fn main() {
// libbb-external.a contains everything needed: barretenberg + env + vm2_stub
println!("cargo:rustc-link-lib=static=bb-external");

// Link C++ standard library (different name on macOS/iOS vs Linux)
let target = std::env::var("TARGET").unwrap();
if target.contains("apple") || target.contains("android") {
println!("cargo:rustc-link-lib=dylib=c++");
} else {
println!("cargo:rustc-link-lib=dylib=stdc++");
}
// Link C++ standard library
// barretenberg is built with Clang/libc++ on all platforms
println!("cargo:rustc-link-lib=dylib=c++");
}
}

Expand Down
Loading