-
-
Couldn't load subscription status.
- Fork 3.1k
Open
Labels
acceptedThis proposal is planned.This proposal is planned.proposalThis issue suggests modifications. If it also has the "accepted" label then it is planned.This issue suggests modifications. If it also has the "accepted" label then it is planned.
Milestone
Description
This issue is to fully eliminate LLVM, Clang, and LLD libraries from the Zig project. The remaining ties to these projects are as follows:
- completely eliminate dependency on LLD #8726
- LLVM
- directly output LLVM bitcode rather than using LLVM's IRBuilder API #13265
- C backend - 1742/1792 tests passing (97%)
- enable the x86 backend by default for debug builds on x86_64-linux #22257
- wasm backend - 1611/1765 tests passing (91%)
- 100% behavior tests passing for the aarch64 backend #21172
- ability to create import libs from def files without LLVM #17807
- Avoid LLVM API for setting a module's code model and PIC/PIE levels #21238
- completely eliminate dependency on LLVM library API calls #25492
- Clang
- C++ source files in zig's repository are built by clang when bootstrapping
-
zig cc,zig c++,zig translate-cand other subcommands without a clang/llvm dependency in the compiler binary #20875 - make resinator use aro's preprocessor instead of clang #17752
- make mingw .def.in file parsing use aro's preprocessor instead of clang #17753
- move
@cImportto the build system #20630
- zig ar: a drop-in llvm-ar replacement #9828
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:
InKryption, alichraghi, Beyley, Mindgibber, jtriley2p and 920 moreMPLew-is, ringoz, musi-musi, loic-sharma, zexa and 161 morejvyden, 0x08088405, andrewschaaf, lin72h, aelzeiny and 74 morelin72h, pietmichal, den-mentiei, imarko, unreal-skif and 74 morescheibo, Jarred-Sumner, pdeva, Phalangers, zekexiao and 65 moremlugg, alichraghi, theoparis, Beyley, ianprime0509 and 150 moremlugg, travisstaloch, alichraghi, lodinukal, achille-roussel and 147 morerodrimati1992, Congee, 190n, chiumichael, aelzeiny and 130 more
Metadata
Metadata
Assignees
Labels
acceptedThis proposal is planned.This proposal is planned.proposalThis issue suggests modifications. If it also has the "accepted" label then it is planned.This issue suggests modifications. If it also has the "accepted" label then it is planned.
Type
Projects
Status
Ditch LLVM