My C compiler compiled itself

30cc is a toy C compiler written in C that is powerful enough to compile itself, making it self-hosting. This means that once compiled with gcc, it can then compile itself using the generated binary file. This process results in a 30cc-compiled version of 30cc, allowing further development without relying on gcc. The output emits x86-64 assembly, though unoptimized, aiming for educational purposes. To use 30cc, you must bootstrap the compiler with make and run build.py to compile itself. The end result is three binary files that behave the same, showcasing the self-hosting capability of 30cc.

https://github.com/keyvank/30cc

To top