Skip to content

cmake: fix persistent ARM CPU detection warning on Clang/macOS#21977

Open
dindinw wants to merge 1 commit intoggml-org:masterfrom
dindinw:master
Open

cmake: fix persistent ARM CPU detection warning on Clang/macOS#21977
dindinw wants to merge 1 commit intoggml-org:masterfrom
dindinw:master

Conversation

@dindinw
Copy link
Copy Markdown
Contributor

@dindinw dindinw commented Apr 16, 2026

Overview

On Clang (especially on macOS), the current detection logic consistently triggers a warning because neither -mcpu= nor -march= can be matched in the output of -mcpu=native -E -v -. As a result, the existing regex fails and always falls back to -mcpu=native, leading to a persistent warning.

This change adds a fallback by parsing -target-cpu <name> from Clang’s output and converting it into a standard -mcpu=<name> flag.

Requirements

@dindinw dindinw requested a review from ggerganov as a code owner April 16, 2026 02:46
@github-actions github-actions bot added the ggml changes relating to the ggml tensor library for machine learning label Apr 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ggml changes relating to the ggml tensor library for machine learning

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant