logoalt Hacker News

meiselyesterday at 10:45 PM1 replyview on HN

> It’s kind of like enabling LTO (Link-Time Optimization) across the libc boundary, except it’s done properly in the frontend instead of too late, in the linker

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?


Replies

ibejoebyesterday at 10:57 PM

Seems like it ought to be able to do inlining and dead code stripping which, I think, wouldn't be viable at link time against optimized static libraries.

show 1 reply