From 6223b6e264dfcbd5d4746f71a33ec052d5ec5476 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrien=20Gallou=C3=ABt?= Date: Thu, 20 Feb 2025 13:44:41 +0100 Subject: [PATCH] Fix build with Mach-O MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Adrien Gallouët --- backends/llamacpp/build.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/backends/llamacpp/build.rs b/backends/llamacpp/build.rs index 499583cd..8f00f3b5 100644 --- a/backends/llamacpp/build.rs +++ b/backends/llamacpp/build.rs @@ -25,8 +25,9 @@ fn main() { for path in &llama.link_paths { println!("cargo:rustc-link-arg=-Wl,-rpath,{}", path.display()); } - println!("cargo:rustc-link-arg=-Wl,--disable-new-dtags"); - + if cfg!(target_os = "linux") { + println!("cargo:rustc-link-arg=-Wl,--disable-new-dtags"); + } let bindings = bindgen::Builder::default() .clang_args( llama