Why is the linker too late? Is Zig able to do optimizations in the frontend that, e.g., a linker working with LLVM IR is not?
LTO essentially means “load the entire compiler backend into the linker and do half of the compilation work at link time”.
It’s a great big hack, but it does work.