State of lld support for Mach-O (ARM64) objects

Hello LLVM!

I am coming from ghc version >= 9.2 generating object files built for unknown-unsupported file format (#21873) · Issues · Glasgow Haskell Compiler / GHC · GitLab and haven’t seen any discussion on this so I’m asking here.

Attempts to merge objects on my M1 mac using the ld.lld interface are immediately hitting unknown file type, even though they are well-formed objects, so I’m led to believe that lld may not support these yet (or Mach-O in general)? Looking forward to hearing some input.

ld.lld invokes the ELF linker; you want ld64.lld

Oh, that makes more sense. Thanks

1 Like

Does GHC directly invoke the linker? Rust invokes cc and let it handle the details, i.e, cc knows whether it is ELF or Mach-O.