3 ms·
Note: this zld is completely written in Zig and it is a good example of Zig codebase of moderate size and complexity.
by sanxiyn 5y ago
Note: this zld is completely written in Zig and it is a good example of Zig codebase of moderate size and complexity.
- bobthebuilders 5y agoThe codebase seems remarkably small. I expected linkers to take a lot more effort to write.
- kristoff_it 5y agoAnd yet, thanks to zld, Zig is the only C/C++ compiler that can link Apple Silicon Mach0 when cross-compiling from another platform. Maybe somewhere in there there's a source of difficulty that doesn't directly translate to lines of code.
- int3 5y agoA lot of the complexity stems from supporting multiple platforms/versions/optimizations/build configs, though. ld64/zld supports 300+ CLI flags... Also, LLD in trunk can link for Apple Silicon too :)