Can someone explain why zig is moving away from llvm but in simple way?

as new to zig programming languages I just want to know the whole reason why zig is moving away from llvm ?


there are answers in this thread


I saw the GitHub discussion, I honestly didn’t understand anything from it. That why i asked here

The link that @JPL posted leads to a thread in this forum discussing the issue, it’s not a link to the GitHub Issue per se.

My bad @dude_the_builder just saw it now tnx

1 Like
  • LLVM is slow.
  • Using a third-party backend for the compiler limits what kind of end-to-end innovations are possible.
  • Bugs in Zig are significantly easier for us to fix than bugs in LLVM.
  • LLVM regularly ships with regressions even though we report them against release candidates.
  • Building Zig from source is made obnoxiously difficult by LLVM. This affects Zig’s availability in system package managers, limits contributions from the open source community, and makes our bootstrap chain depend on C++.
  • Many of our users are interested in avoiding an LLVM monoculture.
  • LLVM development moves slowly. Zig gained a C backend faster than LLVM, for example.
  • We want to add support for many more target CPU architectures than LLVM supports.
  • We cannot control the quality of the LLVM libraries that appear in the wild, and misconfigured LLVM installations reflect poorly on Zig itself. This happens regularly.

The short answer is that LLVM (and clang) is welded to C++ specifically in many non-optimal ways.

A longer answer is in this post that discusses many of the ways in which clang is sub-optimal for general compiling rather than just C++: The future of Clang-based tooling | Trail of Bits Blog