This issue is to fully eliminate LLVM, Clang, and LLD libraries from the Zig project. The remaining ties to these projects are as follows:
Note that while the LLVM backend already outputs .bc files (#13265), the Zig compiler will lack the capability to compile .bc files into object files. Clang will need to be installed separately to handle this use case.
In exchange, Zig gains these benefits:
- All our bugs are belong to us.
- The compiler becomes trivial to build from source and to bootstrap with only a C compiler on the host system.
- We stop dealing with annoying problems introduced by Linux distributions and package managers such as Homebrew related to LLVM, Clang, and LLD. There have been and continue to be many.
- The Zig compiler binary goes from about 150 MiB to 5 MiB.
- Compilation speed is increased by orders of magnitude.
- We can implement our own optimization passes that push the state of the art of computing forward.
- We can attract research projects such as alive2
- We can attract direct contributions from Intel, ARM, RISC-V chip manufacturers, etc., who have a vested interest in making our machine code better on their CPUs.
Please read my other comments in this issue before replying:
This issue is to fully eliminate LLVM, Clang, and LLD libraries from the Zig project. The remaining ties to these projects are as follows:
zig cc,zig c++,zig translate-cand other subcommands without a clang/llvm dependency in the compiler binary #20875@cImportto the build system #20630Note that while the LLVM backend already outputs
.bcfiles (#13265), the Zig compiler will lack the capability to compile .bc files into object files. Clang will need to be installed separately to handle this use case.In exchange, Zig gains these benefits:
Please read my other comments in this issue before replying: