Zig's new ELF linker debuted in version 0.16.0, initially supporting only Zig-only code without external libraries such as libc [1, 2]. With recent enhancements, the linker now supports building the self-hosted Zig compiler with LLVM and LLD libraries enabled, requiring significant low-level improvements [1, 2].

Developers can build the Zig compiler using the commands zig build -Dno-lib -Dnew-linker -Denable-llvm, which activates the new linker and enables LLVM integration. This setup can then produce executables with full LLVM and LLD support [1, 2].

The new ELF linker boosts compile performance by supporting fast incremental compilation on x86_64 Linux. It allows incremental rebuilds that include external libraries and C source files without extra performance overhead [1, 2]. Tests show that building the Zig compiler itself can be reduced from seconds down to as low as 228 milliseconds per rebuild, drastically speeding development cycles [1].

By default, the new linker is disabled and must be manually enabled with the -fnew-linker flag [1, 2]. This cautious rollout helps maintain stability while allowing developers to opt in.

Progress on the new ELF linker with LLVM and LLD support was announced on May 30, 2026, confirming its incremental compilation capability [1, 2]. The improvements mark a major step for Zig's build performance and integration with established compiler tools like LLVM and LLD.

The next step is continued usage and feedback from developers enabling the new linker flag for their projects, as the feature remains opt-in while maturing.