Skip to content

Commit

Permalink
fix: Do not emit link args when compiling with cc crate
Browse files Browse the repository at this point in the history
  • Loading branch information
uttarayan21 committed Nov 11, 2024
1 parent 43639c9 commit db90692
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions mnn-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,14 +117,10 @@ fn main() -> Result<()> {
}

if *MNN_COMPILE {
let install_dir = out_dir.join("mnn-install");
build_cpp_build(&vendor)?;
println!(
"cargo:rustc-link-search=native={}",
install_dir.join("lib").display()
);
} else if let core::result::Result::Ok(lib_dir) = std::env::var("MNN_LIB_DIR") {
println!("cargo:rustc-link-search=native={}", lib_dir);
println!("cargo:rustc-link-lib=static=MNN");
} else {
panic!("MNN_LIB_DIR not set while MNN_COMPILE is false");
}
Expand Down Expand Up @@ -167,7 +163,6 @@ fn main() -> Result<()> {
wasm32_emscripten_libs.display()
);
}
println!("cargo:rustc-link-lib=static=MNN");
Ok(())
}

Expand Down

0 comments on commit db90692

Please sign in to comment.