Skip to content

Mach-O: support for fat objects archives and shared libraries #2065

Description

@marxin

The Mach-O can contain an object or an archive that contains sub-objects for various different architectures. One example of that is the Clang's standard library used by default when linking a C object:

❯ lipo -info /opt/homebrew/Cellar/llvm/22.1.3/lib/clang/22/lib/darwin/libclang_rt.osx.a
Architectures in the fat file: /opt/homebrew/Cellar/llvm/22.1.3/lib/clang/22/lib/darwin/libclang_rt.osx.a are: i386 x86_64 x86_64h arm64 arm64e

We should just inspect the objects (or libraries) and consider aarch64 parts of them. Object's documentation:
https://docs.rs/object/latest/object/macho/struct.FatArch64.html

Metadata

Metadata

Labels

mach-oAnything related to the Mach-O port

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions