[PR #13696] [MERGED] cmake: use CMAKE_SYSTEM_PROCESSOR instead of CMAKE_OSX_ARCHITECTURES for mlx.metallib install #40220

Closed
opened 2026-04-23 01:10:10 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/13696
Author: @jmorganca
Created: 1/13/2026
Status: Merged
Merged: 1/13/2026
Merged by: @jmorganca

Base: mainHead: jmorganca/fix-mac-build


📝 Commits (2)

  • 4962980 scripts: explicitly set CMAKE_OSX_ARCHITECTURES for arm64 build
  • 23eca19 use CMAKE_SYSTEM_PROCESSOR directive instead

📊 Changes

1 file changed (+1 additions, -1 deletions)

View changed files

📝 CMakeLists.txt (+1 -1)

📄 Description

Change mlx.metallib install condition from checking CMAKE_OSX_ARCHITECTURES toCMAKE_SYSTEM_PROCESSOR

CMAKE_OSX_ARCHITECTURES is a user-defined variable that may not be set for native builds. CMAKE_SYSTEM_PROCESSOR reflects the actual target architecture and is already overridden by the cross-compilation logic at the top of CMakeLists.txt when CMAKE_OSX_ARCHITECTURES is explicitly set.

This makes the install condition work correctly for:

  • Native arm64 builds (no explicit architecture flag needed)
  • Cross-compiled arm64 builds (architecture flag triggers the override)

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ollama/ollama/pull/13696 **Author:** [@jmorganca](https://github.com/jmorganca) **Created:** 1/13/2026 **Status:** ✅ Merged **Merged:** 1/13/2026 **Merged by:** [@jmorganca](https://github.com/jmorganca) **Base:** `main` ← **Head:** `jmorganca/fix-mac-build` --- ### 📝 Commits (2) - [`4962980`](https://github.com/ollama/ollama/commit/4962980fcb3ec257758ce88c0479c0769d1fa727) scripts: explicitly set CMAKE_OSX_ARCHITECTURES for arm64 build - [`23eca19`](https://github.com/ollama/ollama/commit/23eca195022bea2b9b570a429850581b56033d00) use CMAKE_SYSTEM_PROCESSOR directive instead ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `CMakeLists.txt` (+1 -1) </details> ### 📄 Description Change mlx.metallib install condition from checking `CMAKE_OSX_ARCHITECTURES` to`CMAKE_SYSTEM_PROCESSOR` `CMAKE_OSX_ARCHITECTURES` is a user-defined variable that may not be set for native builds. `CMAKE_SYSTEM_PROCESSOR` reflects the actual target architecture and is already overridden by the cross-compilation logic at the top of CMakeLists.txt when `CMAKE_OSX_ARCHITECTURES` is explicitly set. This makes the install condition work correctly for: - Native arm64 builds (no explicit architecture flag needed) - Cross-compiled arm64 builds (architecture flag triggers the override) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-23 01:10:10 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#40220