Skip to content

Commit

Permalink
[faiss-sys][static] check the lib64 directory as well for newer compi…
Browse files Browse the repository at this point in the history
…lers
  • Loading branch information
barakmich committed May 20, 2024
1 parent 97cdff8 commit 16c78e4
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions faiss-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,25 @@ fn static_link_faiss() {
cfg.define("FAISS_ENABLE_C_API", "ON")
.define("BUILD_SHARED_LIBS", "OFF")
.define("CMAKE_BUILD_TYPE", "Release")
.define("FAISS_ENABLE_GPU", if cfg!(feature = "gpu") {
"ON"
} else {
"OFF"
})
.define(
"FAISS_ENABLE_GPU",
if cfg!(feature = "gpu") { "ON" } else { "OFF" },
)
.define("FAISS_ENABLE_PYTHON", "OFF")
.define("BUILD_TESTING", "OFF")
.very_verbose(true);
let dst = cfg.build();
let faiss_location = dst.join("lib");
let faiss64_location = dst.join("lib64");
let faiss_c_location = dst.join("build/c_api");
println!(
"cargo:rustc-link-search=native={}",
faiss_location.display()
);
println!(
"cargo:rustc-link-search=native={}",
faiss64_location.display()
);
println!(
"cargo:rustc-link-search=native={}",
faiss_c_location.display()
Expand Down

0 comments on commit 16c78e4

Please sign in to comment.