Skip to content

Commit

Permalink
feat: link to dylib
Browse files Browse the repository at this point in the history
  • Loading branch information
vivianjeng committed Feb 26, 2025
1 parent f910802 commit e325ebd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions crates/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ fn main() {
);

println!("cargo:rustc-link-lib=static=rapidsnark");
println!("cargo:rustc-link-lib=dylib=rapidsnark");
println!("cargo:rustc-link-lib={}", cpp_stdlib);
if target.contains("android") {
// pthread is included in libc in android
Expand All @@ -59,6 +60,9 @@ fn main() {
println!("cargo:rustc-link-lib=static=fr");
println!("cargo:rustc-link-lib=static=fq");
println!("cargo:rustc-link-lib=static=gmp");
println!("cargo:rustc-link-lib=dylib=fr");
println!("cargo:rustc-link-lib=dylib=fq");
println!("cargo:rustc-link-lib=dylib=gmp");

// refer to https://github.com/bbqsrc/cargo-ndk to see how to link the libc++_shared.so file in Android
if env::var("CARGO_CFG_TARGET_OS").unwrap() == "android" {
Expand Down

0 comments on commit e325ebd

Please sign in to comment.