From b5b47da70922572e9ce0668beea3e287e92fd6c6 Mon Sep 17 00:00:00 2001 From: localai-org-maint-bot <306269227+localai-org-maint-bot@users.noreply.github.com> Date: Thu, 30 Jul 2026 05:06:45 +0000 Subject: [PATCH] fix(vllm-cpp): tolerate Apple Clang folding warning Keep the GNU constant-folding diagnostics visible on Darwin without allowing vllm.cpp's global -Werror to fail the Metal backend build. Assisted-by: Codex:gpt-5 [systematic-debugging] --- backend/go/vllm-cpp/Makefile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/backend/go/vllm-cpp/Makefile b/backend/go/vllm-cpp/Makefile index 7d502683b..898116176 100644 --- a/backend/go/vllm-cpp/Makefile +++ b/backend/go/vllm-cpp/Makefile @@ -56,6 +56,11 @@ endif UNAME_S := $(shell uname -s) ifeq ($(UNAME_S),Darwin) LIB=libvllm.dylib + # Apple Clang diagnoses a pair of constant-folded array bounds in the Metal + # build as a GNU extension. vllm.cpp's global -Werror otherwise turns these + # warnings into a hard failure; keep them visible without failing the build. + CMAKE_ARGS+=-DCMAKE_CXX_FLAGS=-Wno-error=gnu-folding-constant + CMAKE_ARGS+=-DCMAKE_OBJCXX_FLAGS=-Wno-error=gnu-folding-constant else LIB=libvllm.so endif