Skip to content

fix xcframework builds - #495

Merged
davidkoski merged 1 commit into
mainfrom
xcframework-fix
Oct 9, 2026
Merged

davidkoski merged 1 commit into
mainfrom
xcframework-fix

Conversation

@davidkoski

Copy link
Copy Markdown
Member

Proposed changes

  • give me an easy way to trigger dry runs
  • the build failed because JIT wasn't available on TVOS
  • this isn't new, so I suspect it was a change on the mlx side that we are now seeing
  • the guard wasn't wide enough -- just visionOS and iOS, widen to IPHONE (which covers all iOS based OS targets)

Checklist

Put an x in the boxes that apply.

  • I have read the CONTRIBUTING document
  • I have run pre-commit run --all-files to format my code / installed pre-commit prior to committing changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have updated the necessary documentation (if needed)

- give me an easy way to trigger dry runs
- the build failed because JIT wasn't available on TVOS
- this isn't new, so I suspect it was a change on the mlx side that we are now seeing
- the guard wasn't wide enough -- just visionOS and iOS, widen to IPHONE (which covers all iOS based OS targets)
run: xcodebuild -showComponent MetalToolchain

- name: Setup gh
if: github.event.release.tag_name || inputs.tag

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With no tag I can trigger this on main/branch to do a dry run.

working-directory: xcode/build/output
run: |
for framework in MLX Cmlx MLXNN MLXOptimizers; do
for framework in MLX Cmlx cLogSupport MLXNN MLXOptimizers; do

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was missing


// select the correct cpu compile system based on TARGET_OS
#if TARGET_OS_IOS || TARGET_OS_VISION
#if TARGET_OS_IPHONE

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the cause of the build failure. See TargetConditionals.h for more details. Despite the unusual name, TARGET_OS_IPHONE is the parent that means iOS derived OS.

@davidkoski
davidkoski merged commit 4dc3edc into main Oct 9, 2026
9 checks passed
@davidkoski
davidkoski deleted the xcframework-fix branch October 9, 2026 02:05
eejd pushed a commit to eejd/mlx-swift that referenced this pull request Oct 18, 2026
Brings in ml-explore#474 (synchronous evals without holding evalLock), ml-explore#499 (evalLock /
dispatch_once lock inversion), ml-explore#495 (xcframework builds) and ml-explore#489 (workflows).
No conflicts.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
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