aboutsummaryrefslogtreecommitdiff
path: root/misc/shimmy/files/llama-cpp-rs/patch-llama-cpp-sys-2_build.rs
diff options
context:
space:
mode:
Diffstat (limited to 'misc/shimmy/files/llama-cpp-rs/patch-llama-cpp-sys-2_build.rs')
-rw-r--r--misc/shimmy/files/llama-cpp-rs/patch-llama-cpp-sys-2_build.rs38
1 files changed, 38 insertions, 0 deletions
diff --git a/misc/shimmy/files/llama-cpp-rs/patch-llama-cpp-sys-2_build.rs b/misc/shimmy/files/llama-cpp-rs/patch-llama-cpp-sys-2_build.rs
new file mode 100644
index 000000000000..de8f6436d05a
--- /dev/null
+++ b/misc/shimmy/files/llama-cpp-rs/patch-llama-cpp-sys-2_build.rs
@@ -0,0 +1,38 @@
+--- llama-cpp-sys-2/build.rs.orig 2025-09-12 14:16:40 UTC
++++ llama-cpp-sys-2/build.rs
+@@ -20,6 +20,7 @@ enum TargetOs {
+ Apple(AppleVariant),
+ Linux,
+ Android,
++ FreeBSD,
+ }
+
+ macro_rules! debug_log {
+@@ -55,6 +56,8 @@ fn parse_target_os() -> Result<(TargetOs, String), Str
+ Ok((TargetOs::Android, target))
+ } else if target.contains("linux") {
+ Ok((TargetOs::Linux, target))
++ } else if target.contains("freebsd") {
++ Ok((TargetOs::FreeBSD, target))
+ } else {
+ Err(target)
+ }
+@@ -632,7 +635,7 @@ fn main() {
+ config.cflag("/FS");
+ config.cxxflag("/FS");
+ }
+- TargetOs::Linux => {
++ TargetOs::Linux | TargetOs::FreeBSD => {
+ println!("cargo:rustc-link-lib=vulkan");
+ }
+ _ => (),
+@@ -738,6 +741,9 @@ fn main() {
+ }
+ TargetOs::Linux => {
+ println!("cargo:rustc-link-lib=dylib=stdc++");
++ }
++ TargetOs::FreeBSD => {
++ println!("cargo:rustc-link-lib=dylib=c++");
+ }
+ TargetOs::Apple(variant) => {
+ println!("cargo:rustc-link-lib=framework=Foundation");