From db9708a1cc28a2b84ab1247ffaabd9f9cdd85ec8 Mon Sep 17 00:00:00 2001 From: localai-org-maint-bot <306269227+localai-org-maint-bot@users.noreply.github.com> Date: Sat, 1 Aug 2026 22:04:47 +0000 Subject: [PATCH] fix(vllm-cpp): disable Darwin folding diagnostic The previous no-error flag is overridden by vllm.cpp's later target-local -Werror. Disable only the Apple Clang folding diagnostic so the Metal build can complete while all other warnings remain fatal. Assisted-by: Codex:gpt-5 [systematic-debugging] --- backend/go/vllm-cpp/Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/backend/go/vllm-cpp/Makefile b/backend/go/vllm-cpp/Makefile index 898116176..f5ab7c562 100644 --- a/backend/go/vllm-cpp/Makefile +++ b/backend/go/vllm-cpp/Makefile @@ -57,10 +57,10 @@ 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 + # build as a GNU extension. Disable that diagnostic because vllm.cpp appends + # target-local -Werror after these global flags, overriding -Wno-error. + CMAKE_ARGS+=-DCMAKE_CXX_FLAGS=-Wno-gnu-folding-constant + CMAKE_ARGS+=-DCMAKE_OBJCXX_FLAGS=-Wno-gnu-folding-constant else LIB=libvllm.so endif