Skip to content

Commit

Permalink
fix(sys): link lora lib if it exists, fixes #300
Browse files Browse the repository at this point in the history
  • Loading branch information
decahedron1 committed Oct 18, 2024
1 parent b19cff4 commit a779c3b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ort-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,10 @@ fn prepare_libort_dir() -> (PathBuf, bool) {
}
}

if lib_dir.join(platform_format_lib("onnxruntime_lora")).exists() {
println!("cargo:rustc-link-lib=static=onnxruntime_lora");
}

if extension_lib_dir.exists() && extension_lib_dir.join(platform_format_lib("ortcustomops")).exists() {
add_search_dir(&extension_lib_dir);
println!("cargo:rustc-link-lib=static=ortcustomops");
Expand Down

0 comments on commit a779c3b

Please sign in to comment.