From f59cf5429046194bf8b7844c5761a34d24f21c22 Mon Sep 17 00:00:00 2001 From: localai-org-maint-bot <306269227+localai-org-maint-bot@users.noreply.github.com> Date: Sun, 2 Aug 2026 10:05:18 +0000 Subject: [PATCH 1/2] fix(build): demote MLX header folding warning Apply the AppleClang exception to the MLX provider source after the target-wide Objective-C++ warning policy. This keeps the diagnostic visible while preventing the external header warning from being promoted by -Werror. FOLLOWING_AGENTS_PROTOCOL Assisted-by: Codex:gpt-5 --- CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7dde3090..ead99ab0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -831,6 +831,11 @@ if(VLLM_CPP_METAL) endif() target_compile_definitions(vllm PUBLIC VLLM_CPP_MLX) target_sources(vllm PRIVATE src/vt/metal/metal_mlx_provider.mm) + # MLX 0.29.x headers use GNU-folding expressions that AppleClang diagnoses. + # Keep that diagnostic visible, but do not let this one external-header + # warning fail the provider TU when vllm_cpp_set_warnings adds -Werror. + set_source_files_properties(src/vt/metal/metal_mlx_provider.mm PROPERTIES + COMPILE_OPTIONS "$<$:-Wno-error=gnu-folding-constant>") # SYSTEM so MLX's own headers cannot break our -Werror build. target_include_directories(vllm SYSTEM PRIVATE "${MLX_ROOT}/include") target_link_libraries(vllm PUBLIC ${MLX_LIBRARY}) From 865593b1c861c1240d4289a01909ac1c0c312b66 Mon Sep 17 00:00:00 2001 From: localai-org-maint-bot <306269227+localai-org-maint-bot@users.noreply.github.com> Date: Sun, 2 Aug 2026 12:03:36 +0000 Subject: [PATCH 2/2] fix(build): suppress MLX folding diagnostic AppleClang's target-level -Werror still promotes the MLX header warning after the source-level -Wno-error option. Disable only this external-header diagnostic on the MLX provider translation unit. FOLLOWING_AGENTS_PROTOCOL Assisted-by: Codex:gpt-5 --- CMakeLists.txt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ead99ab0..2633dcfc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -832,10 +832,11 @@ if(VLLM_CPP_METAL) target_compile_definitions(vllm PUBLIC VLLM_CPP_MLX) target_sources(vllm PRIVATE src/vt/metal/metal_mlx_provider.mm) # MLX 0.29.x headers use GNU-folding expressions that AppleClang diagnoses. - # Keep that diagnostic visible, but do not let this one external-header - # warning fail the provider TU when vllm_cpp_set_warnings adds -Werror. + # Suppress that one external-header diagnostic for this TU. A source-level + # -Wno-error is ordered before vllm_cpp_set_warnings' target-level -Werror, + # so AppleClang promotes it again. set_source_files_properties(src/vt/metal/metal_mlx_provider.mm PROPERTIES - COMPILE_OPTIONS "$<$:-Wno-error=gnu-folding-constant>") + COMPILE_OPTIONS "$<$:-Wno-gnu-folding-constant>") # SYSTEM so MLX's own headers cannot break our -Werror build. target_include_directories(vllm SYSTEM PRIVATE "${MLX_ROOT}/include") target_link_libraries(vllm PUBLIC ${MLX_LIBRARY})