From 2a8cc2f489b92954eb06d3770d7702342a36af07 Mon Sep 17 00:00:00 2001 From: localai-org-maint-bot <306269227+localai-org-maint-bot@users.noreply.github.com> Date: Fri, 31 Jul 2026 15:03:18 +0000 Subject: [PATCH] fix(buun-llama-cpp): isolate fork patch series The buun build copies the stock llama.cpp backend directory, including patches that target upstream. Remove that copied patch directory before invoking the shared build so only the explicit buun compatibility series is applied to the fork. Assisted-by: Codex:gpt-5 [systematic-debugging] --- backend/cpp/buun-llama-cpp/Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/backend/cpp/buun-llama-cpp/Makefile b/backend/cpp/buun-llama-cpp/Makefile index 78b31e979..2a18bf41c 100644 --- a/backend/cpp/buun-llama-cpp/Makefile +++ b/backend/cpp/buun-llama-cpp/Makefile @@ -40,6 +40,9 @@ PATCHES_DIR := $(CURRENT_MAKEFILE_DIR)/patches define buun-llama-cpp-build rm -rf $(CURRENT_MAKEFILE_DIR)/../buun-llama-cpp-$(1)-build cp -rf $(LLAMA_CPP_DIR) $(CURRENT_MAKEFILE_DIR)/../buun-llama-cpp-$(1)-build + # Stock llama.cpp patches target upstream and may not apply to this fork. + # The buun-specific compatibility series is applied explicitly below. + rm -rf $(CURRENT_MAKEFILE_DIR)/../buun-llama-cpp-$(1)-build/patches $(MAKE) -C $(CURRENT_MAKEFILE_DIR)/../buun-llama-cpp-$(1)-build purge # Augment the copied grpc-server.cpp's KV-cache allow-list with the # fork's turbo2/turbo3/turbo4/turbo2_tcq/turbo3_tcq types and wire up the