Chibil C compiler
What is chibil
Chibil is a C compiler based on chibicc rewritten in C# and updated to target .NET IL (MSIL).
It is complete enough to run DOOM (PureDOOM).
Pipeline
Chibil takes C source files and generates COFF OBJ files. These OBJ files are binary-compatible with OBJ files produced by the MSVC compiler in /clr mode. link.exe from Visual Studio is used to link the object files together and produce final executables. One can actually mix and match C++/CLI and chibil-produced object files.
Chibil will probably have its own linker later, if for no other reason, just so we don't need Windows.
Debugging
Line numbers and locals work as expected. You can step through the C code in a .NET debugger.
Standard C library
... continue reading