From 16c78e45faa735d5d0e9a9d0af7abb4aa1446ec8 Mon Sep 17 00:00:00 2001 From: Barak Michener Date: Sun, 19 May 2024 18:06:53 -0700 Subject: [PATCH] [faiss-sys][static] check the lib64 directory as well for newer compilers --- faiss-sys/build.rs | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/faiss-sys/build.rs b/faiss-sys/build.rs index aee4b76..cf3ad46 100644 --- a/faiss-sys/build.rs +++ b/faiss-sys/build.rs @@ -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()