Want to add powerpc-apple-darwin as target - what is involved?

In my quest to get Rust working on PowerPC Darwin I found that LLVM never supported PowerPC Darwin, even though it does support Darwin, and PowerPC.

So methinks it can’t be that hard, although there is a port of LLVM 3.x that looks non-trivial.

But I’m just not sure what is involved. I found a book called Getting Started with LLVM Core Libraries but I’m not sure of the big picture - what does one have to do?

EDIT: one of the things that needs to be done is to emit a 10.5 compatible MachO format executable. But it seems MachOEmitter.cpp is aware of the difference already. So it looks hopeful that there isn’t much actual work to do.

1 Like

Hi @randomshinichi
LLVM used to support darwin PowerPC - in fact I believe that was one of the first targets that was supported. However, the support was deprecated a while ago and eventually removed. Much of the code is still present in the PowerPC backend, but has not been tested for quite some time.

Are you still interested in this? If so, there maybe an option to use an older version of LLVM to accomplish this. I’m not familiar enough with Rust to know what levels of LLVM are required.