Skip to content

Conversation

@hahnjo
Copy link
Member

@hahnjo hahnjo commented Jan 14, 2026

Add file_magic::macho_bundle to the list of recognized shared library types in isSharedLibrary(). This allows Cling to correctly identify and load Mach-O bundle files, which are produced by CMake's MODULE library type.

Without this fix, external dictionary libraries built as bundles (MH_BUNDLE) fail to load on macOS, while the same libraries built as dylibs (MH_DYLIB) work correctly. This is because lookupLibrary() uses isSharedLibrary() to validate library files, and bundles were incorrectly rejected.

(cherry picked from commit 2ef9dbb)

Backport of PR #20861, FYI @chrisburr

Add file_magic::macho_bundle to the list of recognized shared library
types in isSharedLibrary(). This allows Cling to correctly identify
and load Mach-O bundle files, which are produced by CMake's MODULE
library type.

Without this fix, external dictionary libraries built as bundles
(MH_BUNDLE) fail to load on macOS, while the same libraries built
as dylibs (MH_DYLIB) work correctly. This is because lookupLibrary()
uses isSharedLibrary() to validate library files, and bundles were
incorrectly rejected.

(cherry picked from commit 2ef9dbb)
@github-actions
Copy link

github-actions bot commented Jan 14, 2026

Test Results

    18 files      18 suites   3d 2h 19m 26s ⏱️
 2 753 tests  2 753 ✅ 0 💤 0 ❌
47 855 runs  47 855 ✅ 0 💤 0 ❌

Results for commit 41cc44d.

♻️ This comment has been updated with latest results.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants