Skip to content

fix(build): demote MLX header folding warning - #23

Merged
mudler merged 2 commits into
mudler:mainfrom
localai-org-maint-bot:bot/fix-mlx-header-warning
Aug 2, 2026
Merged

fix(build): demote MLX header folding warning#23
mudler merged 2 commits into
mudler:mainfrom
localai-org-maint-bot:bot/fix-mlx-header-warning

Conversation

@localai-org-maint-bot

Copy link
Copy Markdown
Contributor

Summary

  • demote AppleClang's -Wgnu-folding-constant warning only for metal_mlx_provider.mm
  • keep the MLX-header diagnostic visible while preserving -Werror for every other warning
  • place the exception at source scope so downstream directory/global Objective-C++ flags cannot be overridden by vllm_cpp_set_warnings(vllm)

This fixes the repeated Darwin failure observed while integrating the MLX provider in mudler/LocalAI#11137. target_include_directories(... SYSTEM) is insufficient for this diagnostic, and downstream CMAKE_OBJCXX_FLAGS workarounds lose to vllm.cpp's later target-level -Werror.

Verification

  • git diff --check
  • red/green structural assertion verifies exactly one source-scoped, AppleClang Objective-C++ -Wno-error=gnu-folding-constant option and confirms the warning is not suppressed
  • local configure was not run because this runner has no cmake; Darwin CI is the compiler-level verification

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
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
@mudler
mudler merged commit 78137b1 into mudler:main Aug 2, 2026
6 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants