mirror of
https://github.com/mudler/LocalAI.git
synced 2026-07-30 01:48:06 -04:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user