Right now it's not possible to build macOS binaries or object files:
tcc -c hello.c
ld: warning: ignoring file hello.o, file was built for unsupported file format ( 0x7F 0x45 0x4C 0x46 0x02 0x01 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ) which is not the architecture being linked (x86_64): hello.o
Undefined symbols for architecture x86_64:
"_main", referenced from:
implicit entry/start for main executable
However it's possible to "run" the C program on macOS:
tcc -run hello.c
How does this work? Is it like an emulator running ELF on macOS? Where can I find this code? Is it possible to use this code to build Mach-O binaries?
I'd like to contribute. I think it's very important to support such a major OS.