Skip to content

macos: add xcframework Bazel targets#4113

Draft
fonok3 wants to merge 3 commits intomaplibre:mainfrom
fonok3:macos-bazel-xcframework-cleanup
Draft

macos: add xcframework Bazel targets#4113
fonok3 wants to merge 3 commits intomaplibre:mainfrom
fonok3:macos-bazel-xcframework-cleanup

Conversation

@fonok3
Copy link

@fonok3 fonok3 commented Feb 18, 2026

This PR is a proposal for the first part of #4088.

It adds Bazel targets for building macOS xcframeworks (MapLibre.static, MapLibre.dynamic).

For this to work I added a --//:macos_loop=cfrunloop build flag. The default event loop (libuv) does not integrate with the native run loop of AppKit/SwiftUI apps, so async tasks and rendering callbacks do not fire without a manual workaround. With cfrunloop the xcframework uses CFRunLoop directly and works out of the box. Default stays libuv so existing targets keep working without breaking changes.

Also fixes header visibility to match iOS and removes unused OpenGL/Metal file lists.

Bazel build command: bazel build //platform/macos:MapLibre.static --//:renderer=metal --//:macos_loop=cfrunloop

@github-actions github-actions bot added the build Related to build, configuration or CI/CD label Feb 18, 2026
},
)

# Selects the macOS event loop implementation
Copy link
Member

Choose a reason for hiding this comment

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

I think this can move to platform/darwin/BUILD.bazel. What do you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build Related to build, configuration or CI/CD

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments