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]
This commit is contained in:
localai-org-maint-bot
2026-07-30 05:06:45 +00:00
parent 40e7c76ec2
commit b5b47da709

View File

@@ -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