From a8fadc535ab3792de2f01e920cc7615f02afd141 Mon Sep 17 00:00:00 2001 From: localai-org-maint-bot <306269227+localai-org-maint-bot@users.noreply.github.com> Date: Mon, 3 Aug 2026 02:08:39 +0000 Subject: [PATCH] fix(vllm-cpp): pass Darwin warning flag to Objective-C The Metal source that triggers Apple Clang's constant-folding diagnostic is compiled as Objective-C. Pass the targeted suppression through CMAKE_OBJC_FLAGS as well as the C++ language flags so vllm.cpp's -Werror no longer promotes it. Assisted-by: Codex:gpt-5 --- backend/go/vllm-cpp/Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/backend/go/vllm-cpp/Makefile b/backend/go/vllm-cpp/Makefile index db32e322c..1eaaae9a6 100644 --- a/backend/go/vllm-cpp/Makefile +++ b/backend/go/vllm-cpp/Makefile @@ -57,9 +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. Disable that diagnostic because vllm.cpp appends - # target-local -Werror after these global flags, overriding -Wno-error. + # build as a GNU extension. Disable that diagnostic for both Objective-C and + # C++ because vllm.cpp appends target-local -Werror after these global flags. CMAKE_ARGS+=-DCMAKE_CXX_FLAGS=-Wno-gnu-folding-constant + CMAKE_ARGS+=-DCMAKE_OBJC_FLAGS=-Wno-gnu-folding-constant CMAKE_ARGS+=-DCMAKE_OBJCXX_FLAGS=-Wno-gnu-folding-constant else LIB=libvllm.so